Basic Dot Net Question:
Download Job Interview Questions and Answers PDF
What should one do to make class serializable?
Answer:
To 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;
}
[Serializable]
public class MyObject {
public int n1 = 0;
public int n2 = 0;
public String str = null;
}
Download Dot Net Interview Questions And Answers
PDF
Previous Question | Next Question |
What is Viewstate in .NET? | What should you do to store an object in a Viewstate? |