[CategoryAttribute("特性")]
        public virtual double 圆心X坐标
        {
            get
            {
                return Owner.Center.x;
            }
            set
            {
                Owner.Center = new UnitPoint(value, Owner.Center.y);
            }
        }我现在要将CategoryAttribute的"特性"翻译成不同语言版本的,不知道如何实现

解决方案 »

  1.   

    "特性"取自资源文件,你做好不同语言的资源文件
    [CategoryAttribute(Properties.Resources.value)]
      

  2.   

    自己继承CategoryAttribute,然后重写GetLocalizedString方法或者Category属性
      

  3.   

    报错 特性实参必须是特性形参类型的常量表达式、typeof 表达式或数组创建表达式
      

  4.   

    那还是重写 GetLocalizedString 吧,这里面试绝对可以用资源文件的