C# 怎么实现对Attribute实现本地化语言
C# 如何实现对Attribute实现本地化语言C# code[CategoryAttribute(特性)]public virtual double 圆心X坐
C# 如何实现对Attribute实现本地化语言
C# code [CategoryAttribute("特性")] public virtual double 圆心X坐标 { get { return Owner.Center.x; } set { Owner.Center = new UnitPoint(value, Owner.Center.y); } }
我现在要将CategoryAttribute的"特性"翻译成不同语言版本的,不知道如何实现
[解决办法]"特性"取自资源文件,你做好不同语言的资源文件
[CategoryAttribute(Properties.Resources.value)]
[解决办法]自己继承CategoryAttribute,然后重写GetLocalizedString方法或者Category属性
[解决办法]那还是重写 GetLocalizedString 吧,这里面试绝对可以用资源文件的
[解决办法]