Accord.Controls.NumericCollectionEditor.detectCollectionType C# (CSharp) Method

detectCollectionType() private method

private detectCollectionType ( ) : Type
return System.Type
        private Type detectCollectionType()
        {
            PropertyInfo[] properties = TypeDescriptor.GetReflectionType(this.CollectionType)
                .GetProperties(BindingFlags.Instance | BindingFlags.Public);

            for (int i = 0; i < properties.Length; i++)
            {
                if (properties[i].Name == "Item" || properties[i].Name == "Items")
                    return properties[i].PropertyType;
            }

            return typeof(object);
        }