I have an object that's used both on the client and server side.
GenerateScriptType(typeof(MyClass))
However, there are some fields that I don't need on the client, so my question is there any way to prevent those fields being serialized? (For example, Field2 and Field3 in MyClass)
I tried marking the fields with [NonSerialized] but they still get serialized...
public class MyClass
{
public string Field1;
public string Field2
{
get;
set;
}
private string _field3;
public string Field3
{
get
{
return _field3 ?? (_field3 = "lala");
}
}
}
Regards,