다음 코드를 고려하십시오.TypeDescriptor.GetProperties() vs Type.GetProperties()
Object obj;
PropertyDescriptorCollection A = TypeDescriptor.GetProperties(obj);
PropertyInfo[] B = obj.GetType().GetProperties(); // EDIT*
내가 TypeDescriptor.GetProperties을 이해하는 바로는 A와 B의 차이를 이해하기 위해 노력하고있어()는는 만 것입니다) 사용자 정의 에서 TypeDescriptor에게 특성 등 Type.GetProperties를 (반환 객체의 고유 한 "실제"속성을 반환합니다. 이게 옳은 거니? obj에 사용자 정의 TypeDescriptor 속성이 없으면 기본적으로 객체의 리터럴 내장 속성도 반환됩니다. . EDIT 전에 코드
* 원래초 라인 (잘못된 리턴 값했다)
PropertyDescriptorCollection obj.GetType B =()를 GetProperties를();
디자이너에서 사용되지만 데이터 바인딩에도 사용되므로 디자인 타임 기술이 아닙니다. –