Below code represents an example of Opt-Out approach using Serializable and NonSerialized attributes.
/// <summary>
/// Represents a student.
/// </summary>
[Serializable]
public class Student
{
/// <summary>
/// Gets or sets student number.
/// </summary>...