PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(myObject); PropertyDescriptor myProperty = properties["MyProperty"];
PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(myObject); properties.Sort();
PropertyDescriptorCollection properties = TypeDescriptor.GetProperties(myObject); PropertyDescriptorCollection filteredProperties = properties.Filter(new string[] { "MyProperty1", "MyProperty2" });In this example, we are creating a new PropertyDescriptorCollection by filtering the original collection to only include the property descriptors for "MyProperty1" and "MyProperty2". Package library: This class is part of the .NET Framework and does not require an additional package library.