先定义一个枚举
public enum ApplyType
{
Passive,
Buff,
SingleTarget,
MultiTarget
}
参数一是转换类型
参数二是string字符串
ApplyType type = (ApplyType)System.Enum.Parse(typeof(ApplyType), str_applytype);
先定义一个枚举
public enum ApplyType
{
Passive,
Buff,
SingleTarget,
MultiTarget
}
参数一是转换类型
参数二是string字符串
ApplyType type = (ApplyType)System.Enum.Parse(typeof(ApplyType), str_applytype);