System.RuntimeTypeHandle.CreateInstance C# (CSharp) 메소드

CreateInstance() 개인적인 메소드

private CreateInstance ( RuntimeType type, bool publicOnly, bool noCheck, bool &canBeCached, RuntimeMethodHandle &ctor, bool &bNeedSecurityCheck ) : Object
type RuntimeType
publicOnly bool
noCheck bool
canBeCached bool
ctor RuntimeMethodHandle
bNeedSecurityCheck bool
리턴 Object
	    internal static extern Object CreateInstance(RuntimeType type, bool publicOnly, bool noCheck, ref bool canBeCached, ref RuntimeMethodHandle ctor, ref bool bNeedSecurityCheck);

Usage Example

예제 #1
0
        static public T CreateInstance <T>()
        {
            bool bNeedSecurityCheck = true;
            bool bCanBeCached       = false;
            RuntimeMethodHandle mh  = RuntimeMethodHandle.EmptyHandle;

            return((T)RuntimeTypeHandle.CreateInstance(typeof(T) as RuntimeType, true, true, ref bCanBeCached, ref mh, ref bNeedSecurityCheck));
        }