enum
public enum WrongType
{
/// <summary>
/// 系统错误,发送方可以重试
/// </summary>
server,
/// <summary>
/// 用户数据错误
/// </summary>
client
}
public static WrongType GetWrongType(string str)
{
WrongType returnValue;
returnValue = (WrongType)Enum.Parse(typeof(WrongType), str, true);
return returnValue;
}
2.
// 摘要:
// 指定常数来指示要显示的帮助文件元素。
public enum HelpNavigator
{
// 摘要:
// 如果指定的主题存在,则帮助文件将打开到指定的主题。
Topic = -2147483647,
//
// 摘要:
// 帮助文件将打开到目录。
TableOfContents = -2147483646,
//
// 摘要:
// 帮助文件将打开到索引。
Index = -2147483645,
//
// 摘要:
// 帮助文件将打开到搜索页。
Find = -2147483644,
//
// 摘要:
// 帮助文件将打开到特定主题首字母的索引项。
AssociateIndex = -2147483643,
//
// 摘要:
// 如果存在具有指定索引项的主题,则帮助文件打开到该主题;否则将显示与指定关键字最接近的索引项。
KeywordIndex = -2147483642,
//
// 摘要:
// 帮助文件将打开到由数字主题标识符指示的主题。
TopicId = -2147483641,
}
TypeConverter converter;
converter = TypeDescriptor.GetConverter(typeof(HelpNavigator));
foreach (object value in converter.GetStandardValues())
{
navigatorCombox.Items.Add(value);
}