有一些界面:
public interface IMessage
{
string Content;
Person Sender;
}
public class Priv : IMessage
{
public string Content { get; set; }
public Person Sender { get; set; }
private int whatever;
}
public class Publ : IMessage
{
public string Content { get; set; }
public Person Sender { get; set; }
private DateTime something;
}
是否可以在wcf service IMessage
实例中使用?
喜欢void SomeMethod(IMessage toSend)
?