|
-
October 8th, 2008, 05:37 AM
#1
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?
-
October 8th, 2008, 06:46 AM
#2
Re: WCF Serialization
No, it isn't. And it doesn't make sence to have such an ability, because passing methods would break encapsulation.
- Make it run.
- Make it right.
- Make it fast.
Don't hesitate to rate my post. 
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|