枚举方法问题 请高手指教
Enum.IsDefined、Enum.Parse和Enum.GetName。 这3个方法的用法是什么 有什么作用 特别是里面的参数 最好举例说明 谢谢
public static bool IsDefined (
Type enumType,
Object value
)
public static Object Parse (
Type enumType,
string value
)
Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object.
public static Object Parse (
Type enumType,
string value,
bool ignoreCase
)
Converts the string representation of the name or numeric value of one or more enumerated constants to an equivalent enumerated object. A parameter specifies whether the operation is case-sensitive.
public static string[] GetNames (
Type enumType
)