用reflector返编译的文件中,居然有这样的命名方式,但编译不通过。 知道的朋友请告知一下。[CompilerGenerated]
private IList<int> <ValueList>k__BackingField;
 
[CompilerGenerated]
private int <BitmapWidth>k__BackingField;
 
[CompilerGenerated]
private double <YScale>k__BackingField;
 

解决方案 »

  1.   

    [CompilerGenerated] - 编译器生成的,命名当然不是按照c#的命名规范来的
      

  2.   

    [CompilerGenerated]是需要命名空间的,当然通不过,也不可能起作用。
    其它的不过是泛型
      

  3.   

    命名空间要用这个的吧
    System.Collections.Generic 
      

  4.   

    CompilerGenerated是反编译生成的代码如
     public class MyClass
            {
                public string Name{set;get;}
                public string Value { set; get; }            public MyClass(string pName, string pValue) 
                {
                    Name = pName;
                    Value = pValue;
                }        }
    反编译后
    反编译后
    public class MyClass
    {
        // Fields
        [CompilerGenerated]
        private string <Name>k__BackingField;
        [CompilerGenerated]
        private string <Value>k__BackingField;    // Methods
        public MyClass(string pName, string pValue)
        {
            base..ctor();
            this.Name = pName;
            this.Value = pValue;
            return;
        }    // Properties
        public string Name
        {
            [CompilerGenerated]
            get
            {
                string str;
                str = this.<Name>k__BackingField;
            Label_0009:
                return str;
            }
            [CompilerGenerated]
            set
            {
                this.<Name>k__BackingField = value;
                return;
            }
        }    public string Value
        {
            [CompilerGenerated]
            get
            {
                string str;
                str = this.<Value>k__BackingField;
            Label_0009:
                return str;
            }
            [CompilerGenerated]
            set
            {
                this.<Value>k__BackingField = value;
                return;
            }
        }
    }