Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个这样的枚举
enum Animal:byte { Cat=0, Dog=1, Horse=2 }
我想重写ToString()它来编写自定义字符串,因为我的应用程序是多语言的(Cat.ToString()应该检索 cat 的翻译词)。所以Descriptionkeyowrd不能在这里使用。谁能给我一个提示,找到一个巧妙的方法来解决这个问题?
ToString()
Cat.ToString()
Description