标题:序列化对象中出现的问题
只看楼主
zhoufeng1988
Rank: 15Rank: 15Rank: 15Rank: 15Rank: 15
来 自:北京
等 级:贵宾
威 望:27
帖 子:1432
专家分:6329
注 册:2009-5-31
结帖率:100%
 问题点数:0 回复次数:2 
序列化对象中出现的问题
大家看一下这个异常:


程序代码:
using System;
using System.Collections.Generic;
using System.Text;

namespace ChanelUI.ChannelParameterConfigControl._1553
{
    [Serializable]
     public class _1553BParameterEntity
     {
         #region 私有数据

        private int devNo;
        private int device;
        private Function function;
        private string busMode;
        private string intMode;
        private string bcOption;
        private int interruptEnableBitConfiguration;
        private int retry;
        private uint noResTimeOut;
        private uint lateResTimeOut;
        private uint minorFrame;
        private int broadcastMode;
        private int couplingMode;
        private int outPutVoltage;
        private uint bcMsgNum;
        private uint bmMsgNum;
        private List<BCMessageEntity> bcMessages;
        private List<RTBroadcastMessageEntity> broadcastMessages;
        private List<SingleRTMessageEntity> singleRTAddressControlMessages;
        private List<BMMessageEntity> bmMessages;

        #endregion

         #region 属性

        /// <summary>
        /// BC消息集合
        /// </summary>
        public List<BCMessageEntity> BCMessages
        {
            get
            {
                return this.bcMessages;
            }
            set
            {
                this.bcMessages = value;
            }
        }

        /// <summary>
        /// 广播消息集合
        /// </summary>
        public List<RTBroadcastMessageEntity> BroadcastMessages
        {
            get
            {
                return this.broadcastMessages;
            }
            set
            {
                this.broadcastMessages = value;
            }
        }

        /// <summary>
        /// RT消息集合
        /// </summary>
        public List<SingleRTMessageEntity> SingleRTAddressControlMessages
        {
            get
            {
                return this.singleRTAddressControlMessages;
            }
            set
            {
                this.singleRTAddressControlMessages = value;
            }
        }

        /// <summary>
        /// BM消息集合
        /// </summary>
        public List<BMMessageEntity> BMMessages
        {
            get
            {
                return this.bmMessages;
            }
            set
            {
                this.bmMessages = value;
            }
        }

        /// <summary>
        /// 主通道号
        /// </summary>
        public int DevNo
        {
            get
            {
                return this.devNo;
            }
            //set
            //{
            //    this.devNo = value;
            //}
        }

        /// <summary>
        /// 次通道号
        /// </summary>
        public int Device
        {
            get
            {
                return this.device;
            }
            set
            {
                this.device = value;
            }
        }

        /// <summary>
        /// 1553B模式选项
        /// </summary>
        public Function Function_
        {
            get
            {
                return this.function;
            }
            set
            {
                this.function = value;
            }
        }

        /// <summary>
        /// 总线模式
        /// </summary>
        public string BusMode
        {
            get
            {
                return this.busMode;
            }
            set
            {
                this.busMode = value;
            }
        }

        /// <summary>
        /// 中断模式
        /// </summary>
        public string IntMode
        {
            get
            {
                return this.intMode;
            }
            set
            {
                this.intMode = value;
            }
        }

        /// <summary>
        /// BC选项
        /// </summary>
        public string BCOption
        {
            get
            {
                return this.bcOption;
            }
            set
            {
                this.bcOption = value;
            }
        }

        /// <summary>
        /// 中断使能
        /// </summary>
        public int InterruptEnableBitConfiguration
        {
            get
            {
                return this.interruptEnableBitConfiguration;
            }
            set
            {
                this.interruptEnableBitConfiguration = value;
            }
        }

        /// <summary>
        /// 重复选项
        /// </summary>
        public int Retry
        {
            get
            {
                return this.retry;
            }
            set
            {
                this.retry = value;
            }
        }

        /// <summary>
        /// 超时1
        /// </summary>
        public uint NoResTimeOut
        {
            get
            {
                return this.noResTimeOut;
            }
            set
            {
                this.noResTimeOut = value;
            }
        }

        /// <summary>
        /// 超时2
        /// </summary>
        public uint LateResTimeOut
        {
            get
            {
                return this.lateResTimeOut;
            }
            set
     [font=宋体]       {
                this.lateResTimeOut = value;
            }
        }

        /// <summary>
        /// dFrame选项
        /// </summary>
        public uint MinorFrame
        {
            get
            {
                return this.minorFrame;
            }
            set
            {
                this.minorFrame = value;
            }
        }

        /// <summary>
        /// 广播模式设置
        /// </summary>
        public int BroadcastMode
        {
            get
            {
                return this.broadcastMode;
            }
            set
            {
                this.broadcastMode = value;
            }
        }

        /// <summary>
        /// Coup模式
        /// </summary>
        public int CouplingMode[color=#FFFFFF]
搜索更多相关主题的帖子: 序列 对象 
2010-06-01 15:56
zhoufeng1988
Rank: 15Rank: 15Rank: 15Rank: 15Rank: 15
来 自:北京
等 级:贵宾
威 望:27
帖 子:1432
专家分:6329
注 册:2009-5-31
得分:0 
        [/color]{
            
get
            
{
               
return this.couplingMode;
            
}
            
set
            
{
               
this.couplingMode = value;
            
}
        
}

        
/// <summary>
        /// 电压设置
        /// </summary>
        publi[/font]c int OutputVoltage
        
{
            
get
            
{
               
return this.outPutVoltage;
            
}
            
set
            
{
               
this.outPutVoltage = value;
            
}
        
}

        
/// <summary>
        /// BC消息分配
        /// </summary>
        public uint BCMsgNum
        
{
            
get
            
{
               
return this.bcMsgNum;
            
}
            
set
            
{
               
this.bcMsgNum = value;
            
}
        
}

        
/// <summary>
        /// BM消息分配
        /// </summary>
        public uint BMMsgNum
        
{
            
get
            
{
               
return this.bmMsgNum;
            
}
            
set
            
{
               
this.bmMsgNum = value;
            
}
        
}

        
#endregion

         
#region 构造函数

        
public _1553BParameterEntity()
        
{
            
this.devNo = 0;
            
this.bcMessages = new List<BCMessageEntity>();
            
this.broadcastMessages = new List<RTBroadcastMessageEntity>
();
            
this.singleRTAddressControlMessages = new List<SingleRTMessageEntity>();
            
this.bmMessages = new List<BMMessageEntity>();
        
}

        
#endregion
     }
}
2010-06-01 15:57
zhoufeng1988
Rank: 15Rank: 15Rank: 15Rank: 15Rank: 15
来 自:北京
等 级:贵宾
威 望:27
帖 子:1432
专家分:6329
注 册:2009-5-31
得分:0 
这个我要序列化的对象...
大家帮忙看看~~~
2010-06-01 15:57



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-308925-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.299442 second(s), 9 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved