What should one do to make class serializable?
Submitted by: AdministratorTo make a class serializable is to mark it with the Serializable attribute as follows.
[Serializable]
public class MyObject {
public int n1 = 0;
public int n2 = 0;
public String str = null;
}
Submitted by: Administrator
[Serializable]
public class MyObject {
public int n1 = 0;
public int n2 = 0;
public String str = null;
}
Submitted by: Administrator
Read Online Dot Net Job Interview Questions And Answers
Top Dot Net Questions
☺ | What security measures exist for .NET Remoting in System.Runtime.Remoting? |
☺ | What’s the use of System.Diagnostics.Process class in .NET? |
☺ | What is "Common Language Runtime" (CLR) in .NET? |
☺ | What does mean by .NET framework? |
☺ | Observations between VB.NET and VC#.NET? |
Top Dot Net Technologies Categories
☺ | MSF Interview Questions. |
☺ | .Net Architecture Interview Questions. |
☺ | ASP.Net MVC Interview Questions. |
☺ | Entity Framework Interview Questions. |
☺ | C# (Sharp) Programming Language Interview Questions. |