摘要:Enum
獲取全部類型
string[] ass = Enum.GetNames(typeof(SPORTType));
_sportTypes = new List();
foreach (string ss in ass)
{
SPORTType type = (SPORTType)Enum.Parse(typeof(SPORTType), ss);
if ((value & type) != 0)
_sportTypes.Add(type);
}
值1,2,4,8,16,32,64
加 int v = 1|2|4|8|16
取 if((v& 2) != 0)
===================
搞了C#
現在來學學維修筆電