WCF DataContract ToString function

前端 未结 3 425
我寻月下人不归
我寻月下人不归 2020-12-21 06:20

Can you override the ToString function in a WCF DataContrat? Right now I have:

[DataContract]
public class Keyword
{
    public int ID { get; set; }
    pub         


        
3条回答
  •  感情败类
    2020-12-21 07:13

    Where do you want to be able to invoke ToString()? Methods are not part of the DataContract so they won't be available when you create the proxy for the client.

    Of course, nothing is stopping you from coding that method in the client's proxy yourself.

提交回复
热议问题