반응형
        public enum Size
        {
            Small,
            Medium,
            Large
        }
        
        private void Test()
        {
            List<string> sizeStrings = Enum.GetNames(typeof(Size)).ToList();
            List<Size> sizeValues = Enum.GetValues(typeof(Size))
               .Cast<Size>()
               .ToList();
        }
반응형

+ Recent posts