-
WCF Serialization
Is it also possible to serialize a method using WCF. For type [DataContract] needs to be used and for members [DataMember] should be used.
Code:
[DataContract]
public class User {
[DataMember]
public string Name {
get;
set;
}
//I want to to the same thing here
public override string ToString() {
return "Hello";
}
}
Note. This is not the service but a type that is passes by the service.
Is this possible for a method. Or do I need to do this using the service itself?
-
Re: WCF Serialization
No, it isn't. And it doesn't make sence to have such an ability, because passing methods would break encapsulation.