WCF DataContract ToString function -


Can you override the ToString function in WCF DataContrat? I currently have:

  [DataContract] Public class keywords {public int id {get; Set; } Public string name {get; Set; } Public override string toasting () {return name; }}  

But it does not seem to work. Anyway to do this work?

Also remember that if you are both a server and a client, you often create a client proxy Instead of using a shared library for data contracts. If you do this, you can keep the same method on both the server and the client as they are the same type.


Comments

Popular posts from this blog

c# - ListView onScroll event -

PHP - get image from byte array -

Linux Terminal Problem with Non-Canonical Terminal I/O app -