需要在C#中进行double类型的枚举 [英] Need to make an enumeration of type double in c#
本文介绍了需要在C#中进行double类型的枚举的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何创建类型为double的枚举?
How can I create an enum of type double?
有可能还是必须创建某种集合和哈希?
Is it possible or do I have to create some kind of collection and hash?
推荐答案
您不能使其成为枚举。
http://msdn.microsoft.com/zh-CN/library/y94acxy2.aspx
可能性之一:
public static class MyPseudoEnum
{
public static readonly double FirstVal = 0.3;
public static readonly double SecondVal = 0.5;
}
这篇关于需要在C#中进行double类型的枚举的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文