这两个类在客户端服务器通讯时需要用到 暂时称为契约类吧 [ProtoContract] public class LoginContract { //用户ID [ProtoMember(1)] public string UserID { get; set; } //用户密码 [ProtoMember(2)] public string PassWord { get; set; } public LoginContract() { } public LoginContract(string userID, string passWord) { this.UserID = userID; this.PassWord = passWord; } } //操作结果的返回信息 [ProtoContract] public class ResMsgContract { //返回登陆是否成功的信息 [ProtoMember(1)] public string Message; public ResMsgContract() { } public ResMsgContract(string message) { this.Message = message; } } www.networkcomms.cn编辑http://www.cnblogs.com/networkcomms
时间: 2024-12-21 08:32:27