日期:2014-05-18  浏览次数:20450 次

这个get_item到底要怎么转换
有这样一段程序
C# code

using Microsoft.Practices.EnterpriseLibrary.Common.Configuration;
    using Microsoft.Practices.EnterpriseLibrary.Common.Configuration.ObjectBuilder;
    using System;
    using System.Configuration;

    [Assembler(typeof(CacheDependencyAssembler))]
    internal class CacheDependencyData : NameTypeConfigurationElement
    {
        private const string dataBaseProperty = "database";
        private const string dataTableProperty = "table";

        private static void Settings()
        {
            new CacheDependencySettings().IsReadOnly();
        }

        [ConfigurationProperty("database", IsRequired=true)]
        public string Database
        {
            get
            {
                return (string)  base.get_Item("database");
            }
            set
            {
                base.set_Item("database", value);
            }
        }

        [ConfigurationProperty("table", IsRequired=true)]
        public string Table
        {
            get
            {
                return (string) base.get_Item("table");
            }
            set
            {
                base.set_Item("table", value);
            }
        }
    }




现在这段程序 在vs2005 里编译不过去,get_Item和set_Item出错,提示无法显示调用的运算符和访问器
可能是vs2003的产物,要怎么转换,能在vs2005里正常运行

------解决方案--------------------
帮顶