Bosphorus.Dao.Common.Instantiator.ListInstantiator.Create C# (CSharp) Method

Create() public method

public Create ( Type type ) : object
type System.Type
return object
        public object Create(Type type)
        {
            Type elementType = type.GetGenericArguments()[0];
            Type imlementationListType = typeof (List<>).MakeGenericType(elementType);
            object result = Activator.CreateInstance(imlementationListType);

            return result;
        }
    }
ListInstantiator