Nettiers.AdventureWorks.Entities.EntityUtil.MakeGenericType C# (CSharp) Method

MakeGenericType() public static method

Creates a reference to a generic type using the specified type definition and the supplied type arguments.
public static MakeGenericType ( Type typeDefinition, Type typeArguments ) : Type
typeDefinition System.Type A generic type definition.
typeArguments System.Type An array of System.Type arguments.
return System.Type
		public static Type MakeGenericType(Type typeDefinition, Type[] typeArguments)
		{
			Type genericType = null;

			if ( typeDefinition != null && typeArguments != null && typeArguments.Length > 0 )
			{
				genericType = typeDefinition.MakeGenericType(typeArguments);
			}

			return genericType;
		}