I am using serializable, but cannot leave my private class.
[DataContract]
public class test
{
[DataMember]
public String name { get; set; }
}
what problems in leave this class in public.
I do not understand this encapsulation, because I can't use it this way.
[DataContract]
public class test
{
[DataMember]
private int myVar;
public int MyProperty
{
get { return myVar; }
set { myVar = value; }
}
}