获取枚举的长度方法

        public enum typeList
        {
            type1,
            type2,
            type3
        }

 

Response.Write(Enum.GetNames(typeof(typeList)).Length);

转载于:https://www.cnblogs.com/ccsbb/archive/2010/11/10/1873839.html

你可能感兴趣的:(数据库,游戏,java)