■ 정적 클래스 속성 나열하기

----------------------------------------------------------------------------------------------------

using System;

using System.Reflection;

using System.Windows.Media;

 

Type type = typeof(Colors);

 

PropertyInfo[] propertyInfoArray = type.GetProperties(BindingFlags.Public | BindingFlags.Static);

 

foreach(PropertyInfo propertyInfo in propertyInfoArray)

{

    Console.WriteLine(propertyInfo.Name);

}

----------------------------------------------------------------------------------------------------

Posted by 사용자 icodebroker

댓글을 달아 주세요