当前位置: 代码迷 >> ASP.NET >> 高分,请您给看这个私有变量是从哪来的。100分,100分。解决方法
  详细解决方案

高分,请您给看这个私有变量是从哪来的。100分,100分。解决方法

热度:931   发布时间:2013-02-25 00:00:00.0
高分,请您给看这个私有变量是从哪来的。100分,100分。
.net2.0   自定义配置节   (处理自定义配置文件)  

文件来源是:
http://www.cnblogs.com/luoxiao/archive/2007/08/03/842199


        public   class   MyBookShopConfigurationElement   :   ConfigurationElement
        {
                public   MyBookShopConfigurationElement(String   key,   String   value)
                {
                        this.Key   =   key;
                        this.Value   =   value;
                }

                public   MyBookShopConfigurationElement()
                {
                }

                [ConfigurationProperty( "key ",   DefaultValue   =   " ",   IsRequired   =   true,   IsKey   =   true)]
                public   string   Key
                {
                        get
                        {
                                return   (string)this[ "key "];
                        }
                        set
                        {
                                this[ "key "]   =   value;
                        }
                }

                [ConfigurationProperty( "value ",   DefaultValue   =   " ",   IsRequired   =   true)]
                //[RegexStringValidator(@ "\w+:\/\/[\w.]+\S* ")]
                public   string   Value
                {
                        get
                        {
                                return   (string)this[ "value "];//这是这个,这个私有变量是哪   来的??
                        }
                        set
                        {
                                this[ "value "]   =   value;
  相关解决方案