PropertyGrid.EditorManager.GetCollectionItemType C# (CSharp) Method

GetCollectionItemType() public static method

public static GetCollectionItemType ( Type colType ) : Type
colType System.Type
return System.Type
        public static Type GetCollectionItemType(Type colType)
        {
            foreach (PropertyInfo member in colType.GetProperties ()) {
                if (member.Name == "Item") {
                    if (member.PropertyType != typeof (object))
                        return member.PropertyType;
                }
            }
            return null;
        }