zoukankan      html  css  js  c++  java
  • 隐式类型转换

    public class clsBackResult //: SmsResult
        {
            public int MsgCode { get; set; }
            public string Message { get; set; }
            public int ResultCode { get; set; }
            public string QueryCode { get; set; }
            public int Times { get; set; }//其他操作返回信息
    
            /// <summary>
            /// 隐式将SmsResult转当前类型
            /// </summary>
            /// <param name="value"></param>
            /// <returns></returns>
            public static implicit operator clsBackResult(SmsResult value)
            {
                return new clsBackResult()
                {
                    MsgCode = value.MsgCode,
                    Message = value.Message,
                    QueryCode = value.QueryCode
                };
            }
        }
        /// <summary>
        /// 
        /// </summary>
        public class SmsResult
        {
            //"{"MsgCode":106,"Message":"数字证书与参数不匹配","QueryCode":""}"
            public int MsgCode { get; set; }
            public string Message { get; set; }
            public string QueryCode { get; set; }
        }
  • 相关阅读:
    probuf了解
    rebbitmq-RPC(C#)
    获取指定数量的有序列表
    RPC(Remote Procedure Call Protocol)
    正则表达式(c#)
    02_python函数
    01_python基础
    养生茶
    测试左右移浅淡
    python类的组合
  • 原文地址:https://www.cnblogs.com/qitianshuye/p/5505195.html
Copyright © 2011-2022 走看看