none
关于wcf传递int参数变为0的问题 RRS feed

  • 问题

  • 如题,不知为何,有的int参数传到服务端会变成0,会有哪些情况导致这种事情的发生?

    类定义如下

    [Serializable]
    [DataContract]	
    public partial class ChkThicknessLine2	
    {		
    public ChkThicknessLine2(){}		
    #region Model		
    private string _ctrecno;		
    private int _ctline;		
    private string _ctremark;		
    private byte[] _ctimage;		
    /// <summary>		
    /// 图片组单号		
    /// </summary>        
    [DataMember]		
    public string CTRecNo		
    {			
    set{ _ctrecno=value;}			
    get{return _ctrecno;}		
    }		
    /// <summary>		
    /// 行		
    /// </summary>        
    [DataMember]		
    public int CTLine		
    {			
    set{ _ctline=value;}			
    get{return _ctline;}		
    }		
    /// <summary>		
    /// 图片备注		
    /// </summary>        
    [DataMember]		
    public string CTRemark		
    {			
    set{ _ctremark=value;}			
    get{return _ctremark;}		
    }		
    /// <summary>		
    /// 图片数据		
    /// </summary>        
    [DataMember]		
    public byte[] CTImage		
    {			
    set{ _ctimage=value;}			
    get{return _ctimage;}		
    }		
    #endregion Model	
    }


    2012年4月25日 3:45

答案

全部回复