System.Runtime.Serialization.Plists.Extensions.IsCollection C# (CSharp) Метод

IsCollection() публичный статический Метод

Gets a value indicating whether the specified type is a collection type.
public static IsCollection ( this type ) : bool
type this The type to check.
Результат bool
        public static bool IsCollection(this Type type)
        {
            if (type == null)
            {
                throw new ArgumentNullException("type", "type cannot be null.");
            }

            return (typeof(Array).IsAssignableFrom(type)
                || typeof(IEnumerable).IsAssignableFrom(type))
                && !typeof(string).IsAssignableFrom(type)
                && !typeof(byte[]).IsAssignableFrom(type);
        }