AppDomain.CreateInstanceAndUnwrap メソッド (String, String, Object )
指定した型の新しいインスタンスを作成します。パラメータには、型が定義されているアセンブリの名前、型の名前、およびアクティベーション属性の配列を指定します。
Overloads Public Function CreateInstanceAndUnwrap( _
ByVal assemblyName As String, _ ByVal typeName As String, _ ByVal activationAttributes() As Object _) As Object
[C#]
public object CreateInstanceAndUnwrap(stringassemblyName,stringtypeName,object[] activationAttributes);
[C++]
public: Object* CreateInstanceAndUnwrap(String* assemblyName,String* typeName,Object* activationAttributes __gc[]);
[JScript]
public function CreateInstanceAndUnwrap(
assemblyName : String,typeName : String,activationAttributes : Object[]) : Object;
パラメータ
- assemblyName
アセンブリの表示名。 - typeName
要求する型の完全限定型名。 - activationAttributes
アクティべーションに参加できる 1 つ以上の属性を格納している配列。
戻り値
typeName で指定したオブジェクトのインスタンス。
例外
例外の種類 | 条件 |
---|---|
ArgumentNullException | assemblyName または typeName が null 参照 (Visual Basic では Nothing) です。 |
MissingMethodException | 一致するパブリック コンストラクタが見つかりませんでした。 |
TypeLoadException | assemblyName で、 typename が見つかりませんでした。 |
FileNotFoundException | assemblyName が見つかりませんでした。 |
MethodAccessException | 呼び出し元に、このコンストラクタを呼び出すためのアクセス許可がありません。 |
NotSupportedException | MarshalByRefObject から継承されていないオブジェクトに対して、呼び出し元がアクティベーション属性を与えることはできません。 |
SecurityException | 呼び出し元に、正しいアクセス許可がありません。要件のセクションを参照してください。 |
AppDomainUnloadedException | 操作が、アンロードされたアプリケーション ドメインで試行されています。 |
解説
このメソッドは、 CreateInstance と ObjectHandle.Unwrap を組み合わせた便利なメソッドです。このメソッドは、 typeName の既定のコンストラクタを呼び出します。
assemblyName の書式については、 AssemblyName のトピックを参照してください。
使用例
Imports System
Imports System.IO
Imports System.Threading
Imports System.Reflection
Imports System.Reflection.Emit
Imports System.Runtime.Remoting
Class ADDyno
Public Shared Function CreateADynamicAssembly(ByRef myNewDomain As AppDomain, executableNameNoExe As String) As Type
Dim executableName As String = executableNameNoExe + ".exe"
Dim myAsmName As New AssemblyName()
myAsmName.Name = executableNameNoExe
myAsmName.CodeBase = Environment.CurrentDirectory
Dim myAsmBuilder As AssemblyBuilder = myNewDomain.DefineDynamicAssembly(myAsmName, AssemblyBuilderAccess.RunAndSave)
Console.WriteLine("-- Dynamic Assembly instantiated.")
Dim myModBuilder As ModuleBuilder = myAsmBuilder.DefineDynamicModule(executableNameNoExe, executableName)
Dim myTypeBuilder As TypeBuilder = myModBuilder.DefineType(executableNameNoExe, TypeAttributes.Public, GetType(MarshalByRefObject))
Dim myFCMethod As MethodBuilder = myTypeBuilder.DefineMethod("CountLocalFiles", MethodAttributes.Public Or MethodAttributes.Static, Nothing, New Type() {})
Dim currentDirGetMI As MethodInfo = GetType(Environment).GetProperty("CurrentDirectory").GetGetMethod()
Dim writeLine0objMI As MethodInfo = GetType(Console).GetMethod("WriteLine", New Type() {GetType(String)})
Dim writeLine2objMI As MethodInfo = GetType(Console).GetMethod("WriteLine", New Type() {GetType(String), GetType(Object), GetType(Object)})
Dim getFilesMI As MethodInfo = GetType(Directory).GetMethod("GetFiles", New Type() {GetType(String)})
myFCMethod.InitLocals = True
Dim myFCIL As ILGenerator = myFCMethod.GetILGenerator()
Console.WriteLine("-- Generating MSIL method body...")
Dim v0 As LocalBuilder = myFCIL.DeclareLocal(GetType(String))
Dim v1 As LocalBuilder = myFCIL.DeclareLocal(GetType(Integer))
Dim v2 As LocalBuilder = myFCIL.DeclareLocal(GetType(String))
Dim v3 As LocalBuilder = myFCIL.DeclareLocal(GetType(String()))
Dim evalForEachLabel As Label = myFCIL.DefineLabel()
Dim topOfForEachLabel As Label = myFCIL.DefineLabel()
' Build the method body.
myFCIL.EmitCall(OpCodes.Call, currentDirGetMI, Nothing)
myFCIL.Emit(OpCodes.Stloc_S, v0)
myFCIL.Emit(OpCodes.Ldc_I4_0)
myFCIL.Emit(OpCodes.Stloc_S, v1)
myFCIL.Emit(OpCodes.Ldstr, "---")
myFCIL.EmitCall(OpCodes.Call, writeLine0objMI, Nothing)
myFCIL.Emit(OpCodes.Ldloc_S, v0)
myFCIL.EmitCall(OpCodes.Call, getFilesMI, Nothing)
myFCIL.Emit(OpCodes.Stloc_S, v3)
myFCIL.Emit(OpCodes.Br_S, evalForEachLabel)
' foreach loop starts here.
myFCIL.MarkLabel(topOfForEachLabel)
' Load array of strings and index, store value at index for output.
myFCIL.Emit(OpCodes.Ldloc_S, v3)
myFCIL.Emit(OpCodes.Ldloc_S, v1)
myFCIL.Emit(OpCodes.Ldelem_Ref)
myFCIL.Emit(OpCodes.Stloc_S, v2)
myFCIL.Emit(OpCodes.Ldloc_S, v2)
myFCIL.EmitCall(OpCodes.Call, writeLine0objMI, Nothing)
' Increment counter by one.
myFCIL.Emit(OpCodes.Ldloc_S, v1)
myFCIL.Emit(OpCodes.Ldc_I4_1)
myFCIL.Emit(OpCodes.Add)
myFCIL.Emit(OpCodes.Stloc_S, v1)
' Determine if end of file list array has been reached.
myFCIL.MarkLabel(evalForEachLabel)
myFCIL.Emit(OpCodes.Ldloc_S, v1)
myFCIL.Emit(OpCodes.Ldloc_S, v3)
myFCIL.Emit(OpCodes.Ldlen)
myFCIL.Emit(OpCodes.Conv_I4)
myFCIL.Emit(OpCodes.Blt_S, topOfForEachLabel)
'foreach loop end here.
myFCIL.Emit(OpCodes.Ldstr, "---")
myFCIL.EmitCall(OpCodes.Call, writeLine0objMI, Nothing)
myFCIL.Emit(OpCodes.Ldstr, "There are {0} files in {1}.")
myFCIL.Emit(OpCodes.Ldloc_S, v1)
myFCIL.Emit(OpCodes.Box, GetType(Integer))
myFCIL.Emit(OpCodes.Ldloc_S, v0)
myFCIL.EmitCall(OpCodes.Call, writeLine2objMI, Nothing)
myFCIL.Emit(OpCodes.Ret)
Dim myType As Type = myTypeBuilder.CreateType()
myAsmBuilder.SetEntryPoint(myFCMethod)
myAsmBuilder.Save(executableName)
Console.WriteLine("-- Method generated, type completed, and assembly saved to disk.")
Return myType
End Function 'CreateADynamicAssembly
Public Shared Sub Main()
Dim executableName As String = Nothing
Dim domainDir As String
Console.Write("Enter a name for the file counting assembly: ")
Dim executableNameNoExe As String = Console.ReadLine()
executableName = executableNameNoExe + ".exe"
Console.WriteLine("---")
domainDir = Environment.CurrentDirectory
Dim curDomain As AppDomain = Thread.GetDomain()
' Create a new AppDomain, with the current directory as the base.
Console.WriteLine("Current Directory: {0}", Environment.CurrentDirectory)
Dim mySetupInfo As New AppDomainSetup()
mySetupInfo.ApplicationBase = domainDir
mySetupInfo.ApplicationName = executableNameNoExe
mySetupInfo.LoaderOptimization = LoaderOptimization.SingleDomain
Dim myDomain As AppDomain = AppDomain.CreateDomain(executableNameNoExe, Nothing, mySetupInfo)
Console.WriteLine("Creating a new AppDomain '{0}'...", executableNameNoExe)
Console.WriteLine("-- Base Directory = '{0}'", myDomain.BaseDirectory)
Console.WriteLine("-- Shadow Copy? = '{0}'", myDomain.ShadowCopyFiles)
Console.WriteLine("---")
Dim myFCType As Type = CreateADynamicAssembly(curDomain, executableNameNoExe)
Console.WriteLine("Loading '{0}' from '{1}'...", executableName, myDomain.BaseDirectory.ToString())
Dim bFlags As BindingFlags = BindingFlags.Public Or BindingFlags.CreateInstance Or BindingFlags.Instance
Dim myObjInstance As [Object] = myDomain.CreateInstanceAndUnwrap(executableNameNoExe, executableNameNoExe, False, bFlags, Nothing, Nothing, Nothing, Nothing, Nothing)
Console.WriteLine("Executing method 'CountLocalFiles' in {0}...", myObjInstance.ToString())
myFCType.InvokeMember("CountLocalFiles", BindingFlags.InvokeMethod, Nothing, myObjInstance, New Object() {})
End Sub 'Main
End Class 'ADDyno
[C#]
using System;
using System.IO;
using System.Threading;
using System.Reflection;
using System.Reflection.Emit;
using System.Runtime.Remoting;
class ADDyno
{
public static Type CreateADynamicAssembly(ref AppDomain myNewDomain,
string executableNameNoExe)
{
string executableName = executableNameNoExe + ".exe";
AssemblyName myAsmName = new AssemblyName();
myAsmName.Name = executableNameNoExe;
myAsmName.CodeBase = Environment.CurrentDirectory;
AssemblyBuilder myAsmBuilder = myNewDomain.DefineDynamicAssembly(myAsmName,
AssemblyBuilderAccess.RunAndSave);
Console.WriteLine("-- Dynamic Assembly instantiated.");
ModuleBuilder myModBuilder = myAsmBuilder.DefineDynamicModule(executableNameNoExe,
executableName);
TypeBuilder myTypeBuilder = myModBuilder.DefineType(executableNameNoExe,
TypeAttributes.Public,
typeof(MarshalByRefObject));
MethodBuilder myFCMethod = myTypeBuilder.DefineMethod("CountLocalFiles",
MethodAttributes.Public |
MethodAttributes.Static,
null,
new Type[] { });
MethodInfo currentDirGetMI = typeof(Environment).GetProperty("CurrentDirectory").GetGetMethod();
MethodInfo writeLine0objMI = typeof(Console).GetMethod("WriteLine",
new Type[] { typeof(string) });
MethodInfo writeLine2objMI = typeof(Console).GetMethod("WriteLine",
new Type[] { typeof(string), typeof(object), typeof(object) });
MethodInfo getFilesMI = typeof(Directory).GetMethod("GetFiles",
new Type[] { typeof(string) });
myFCMethod.InitLocals = true;
ILGenerator myFCIL = myFCMethod.GetILGenerator();
Console.WriteLine("-- Generating MSIL method body...");
LocalBuilder v0 = myFCIL.DeclareLocal(typeof(string));
LocalBuilder v1 = myFCIL.DeclareLocal(typeof(int));
LocalBuilder v2 = myFCIL.DeclareLocal(typeof(string));
LocalBuilder v3 = myFCIL.DeclareLocal(typeof(string[]));
Label evalForEachLabel = myFCIL.DefineLabel();
Label topOfForEachLabel = myFCIL.DefineLabel();
// Build the method body.
myFCIL.EmitCall(OpCodes.Call, currentDirGetMI, null);
myFCIL.Emit(OpCodes.Stloc_S, v0);
myFCIL.Emit(OpCodes.Ldc_I4_0);
myFCIL.Emit(OpCodes.Stloc_S, v1);
myFCIL.Emit(OpCodes.Ldstr, "---");
myFCIL.EmitCall(OpCodes.Call, writeLine0objMI, null);
myFCIL.Emit(OpCodes.Ldloc_S, v0);
myFCIL.EmitCall(OpCodes.Call, getFilesMI, null);
myFCIL.Emit(OpCodes.Stloc_S, v3);
myFCIL.Emit(OpCodes.Br_S, evalForEachLabel);
// foreach loop starts here.
myFCIL.MarkLabel(topOfForEachLabel);
// Load array of strings and index, store value at index for output.
myFCIL.Emit(OpCodes.Ldloc_S, v3);
myFCIL.Emit(OpCodes.Ldloc_S, v1);
myFCIL.Emit(OpCodes.Ldelem_Ref);
myFCIL.Emit(OpCodes.Stloc_S, v2);
myFCIL.Emit(OpCodes.Ldloc_S, v2);
myFCIL.EmitCall(OpCodes.Call, writeLine0objMI, null);
// Increment counter by one.
myFCIL.Emit(OpCodes.Ldloc_S, v1);
myFCIL.Emit(OpCodes.Ldc_I4_1);
myFCIL.Emit(OpCodes.Add);
myFCIL.Emit(OpCodes.Stloc_S, v1);
// Determine if end of file list array has been reached.
myFCIL.MarkLabel(evalForEachLabel);
myFCIL.Emit(OpCodes.Ldloc_S, v1);
myFCIL.Emit(OpCodes.Ldloc_S, v3);
myFCIL.Emit(OpCodes.Ldlen);
myFCIL.Emit(OpCodes.Conv_I4);
myFCIL.Emit(OpCodes.Blt_S, topOfForEachLabel);
//foreach loop end here.
myFCIL.Emit(OpCodes.Ldstr, "---");
myFCIL.EmitCall(OpCodes.Call, writeLine0objMI, null);
myFCIL.Emit(OpCodes.Ldstr, "There are {0} files in {1}.");
myFCIL.Emit(OpCodes.Ldloc_S, v1);
myFCIL.Emit(OpCodes.Box, typeof(int));
myFCIL.Emit(OpCodes.Ldloc_S, v0);
myFCIL.EmitCall(OpCodes.Call, writeLine2objMI, null);
myFCIL.Emit(OpCodes.Ret);
Type myType = myTypeBuilder.CreateType();
myAsmBuilder.SetEntryPoint(myFCMethod);
myAsmBuilder.Save(executableName);
Console.WriteLine("-- Method generated, type completed, and assembly saved to disk.");
return myType;
}
public static void Main()
{
string domainDir, executableName = null;
Console.Write("Enter a name for the file counting assembly: ");
string executableNameNoExe = Console.ReadLine();
executableName = executableNameNoExe + ".exe";
Console.WriteLine("---");
domainDir = Environment.CurrentDirectory;
AppDomain curDomain = Thread.GetDomain();
// Create a new AppDomain, with the current directory as the base.
Console.WriteLine("Current Directory: {0}", Environment.CurrentDirectory);
AppDomainSetup mySetupInfo = new AppDomainSetup();
mySetupInfo.ApplicationBase = domainDir;
mySetupInfo.ApplicationName = executableNameNoExe;
mySetupInfo.LoaderOptimization = LoaderOptimization.SingleDomain;
AppDomain myDomain = AppDomain.CreateDomain(executableNameNoExe,
null, mySetupInfo);
Console.WriteLine("Creating a new AppDomain '{0}'...",
executableNameNoExe);
Console.WriteLine("-- Base Directory = '{0}'", myDomain.BaseDirectory);
Console.WriteLine("-- Shadow Copy? = '{0}'", myDomain.ShadowCopyFiles);
Console.WriteLine("---");
Type myFCType = CreateADynamicAssembly(ref curDomain,
executableNameNoExe);
Console.WriteLine("Loading '{0}' from '{1}'...", executableName,
myDomain.BaseDirectory.ToString());
BindingFlags bFlags = (BindingFlags.Public | BindingFlags.CreateInstance |
BindingFlags.Instance);
Object myObjInstance = myDomain.CreateInstanceAndUnwrap(executableNameNoExe,
executableNameNoExe, false, bFlags,
null, null, null, null, null);
Console.WriteLine("Executing method 'CountLocalFiles' in {0}...",
myObjInstance.ToString());
myFCType.InvokeMember("CountLocalFiles", BindingFlags.InvokeMethod, null,
myObjInstance, new object[] { });
}
}
[C++]
#using <mscorlib.dll>
using namespace System;
using namespace System::IO;
using namespace System::Threading;
using namespace System::Reflection;
using namespace System::Reflection::Emit;
using namespace System::Runtime::Remoting;
__gc class ADDyno
{
public:
static Type* CreateADynamicAssembly(AppDomain** myNewDomain,
String* executableNameNoExe)
{
String* executableName = String::Concat( executableNameNoExe, S".exe" );
AssemblyName* myAsmName = new AssemblyName();
myAsmName->Name = executableNameNoExe;
myAsmName->CodeBase = Environment::CurrentDirectory;
AssemblyBuilder* myAsmBuilder = (*myNewDomain)->DefineDynamicAssembly(myAsmName,
AssemblyBuilderAccess::RunAndSave);
Console::WriteLine(S"-- Dynamic Assembly instantiated.");
ModuleBuilder* myModBuilder = myAsmBuilder->DefineDynamicModule(executableNameNoExe,
executableName);
TypeBuilder* myTypeBuilder = myModBuilder->DefineType(executableNameNoExe,
TypeAttributes::Public,
__typeof(MarshalByRefObject));
Type* temp0 [] = 0;
MethodBuilder* myFCMethod = myTypeBuilder->DefineMethod(S"CountLocalFiles",
static_cast<MethodAttributes>(MethodAttributes::Public | MethodAttributes::Static),
0,
temp0);
MethodInfo* currentDirGetMI = __typeof(Environment)->GetProperty(S"CurrentDirectory")->GetGetMethod();
Type* temp1 [] = {__typeof(String)};
MethodInfo* writeLine0objMI = __typeof(Console)->GetMethod(S"WriteLine",
temp1);
Type* temp2 [] = {__typeof(String), __typeof(Object), __typeof(Object)};
MethodInfo* writeLine2objMI = __typeof(Console)->GetMethod(S"WriteLine",
temp2);
Type* temp3 [] = {__typeof(String)};
MethodInfo* getFilesMI = __typeof(Directory)->GetMethod(S"GetFiles",
temp3);
myFCMethod->InitLocals = true;
ILGenerator* myFCIL = myFCMethod->GetILGenerator();
Console::WriteLine(S"-- Generating MSIL method body...");
LocalBuilder* v0 = myFCIL->DeclareLocal(__typeof(String));
LocalBuilder* v1 = myFCIL->DeclareLocal(__typeof(int));
LocalBuilder* v2 = myFCIL->DeclareLocal(__typeof(String));
LocalBuilder* v3 = myFCIL->DeclareLocal(__typeof(String*[]));
Label evalForEachLabel = myFCIL->DefineLabel();
Label topOfForEachLabel = myFCIL->DefineLabel();
// Build the method body.
myFCIL->EmitCall(OpCodes::Call, currentDirGetMI, 0);
myFCIL->Emit(OpCodes::Stloc_S, v0);
myFCIL->Emit(OpCodes::Ldc_I4_0);
myFCIL->Emit(OpCodes::Stloc_S, v1);
myFCIL->Emit(OpCodes::Ldstr, S"---");
myFCIL->EmitCall(OpCodes::Call, writeLine0objMI, 0);
myFCIL->Emit(OpCodes::Ldloc_S, v0);
myFCIL->EmitCall(OpCodes::Call, getFilesMI, 0);
myFCIL->Emit(OpCodes::Stloc_S, v3);
myFCIL->Emit(OpCodes::Br_S, evalForEachLabel);
// foreach loop starts here.
myFCIL->MarkLabel(topOfForEachLabel);
// Load array of strings and index, store value at index for output.
myFCIL->Emit(OpCodes::Ldloc_S, v3);
myFCIL->Emit(OpCodes::Ldloc_S, v1);
myFCIL->Emit(OpCodes::Ldelem_Ref);
myFCIL->Emit(OpCodes::Stloc_S, v2);
myFCIL->Emit(OpCodes::Ldloc_S, v2);
myFCIL->EmitCall(OpCodes::Call, writeLine0objMI, 0);
// Increment counter by one.
myFCIL->Emit(OpCodes::Ldloc_S, v1);
myFCIL->Emit(OpCodes::Ldc_I4_1);
myFCIL->Emit(OpCodes::Add);
myFCIL->Emit(OpCodes::Stloc_S, v1);
// Determine if end of file list array has been reached.
myFCIL->MarkLabel(evalForEachLabel);
myFCIL->Emit(OpCodes::Ldloc_S, v1);
myFCIL->Emit(OpCodes::Ldloc_S, v3);
myFCIL->Emit(OpCodes::Ldlen);
myFCIL->Emit(OpCodes::Conv_I4);
myFCIL->Emit(OpCodes::Blt_S, topOfForEachLabel);
//foreach loop end here.
myFCIL->Emit(OpCodes::Ldstr, S"---");
myFCIL->EmitCall(OpCodes::Call, writeLine0objMI, 0);
myFCIL->Emit(OpCodes::Ldstr, S"There are {0} files in {1}.");
myFCIL->Emit(OpCodes::Ldloc_S, v1);
myFCIL->Emit(OpCodes::Box, __typeof(int));
myFCIL->Emit(OpCodes::Ldloc_S, v0);
myFCIL->EmitCall(OpCodes::Call, writeLine2objMI, 0);
myFCIL->Emit(OpCodes::Ret);
Type* myType = myTypeBuilder->CreateType();
myAsmBuilder->SetEntryPoint(myFCMethod);
myAsmBuilder->Save(executableName);
Console::WriteLine(S"-- Method generated, type completed, and assembly saved to disk.");
return myType;
}
};
int main()
{
String* domainDir;
String* executableName = 0;
Console::Write(S"Enter a name for the file counting assembly: ");
String* executableNameNoExe = Console::ReadLine();
executableName = String::Concat( executableNameNoExe, S".exe" );
Console::WriteLine(S"---");
domainDir = Environment::CurrentDirectory;
AppDomain* curDomain = Thread::GetDomain();
// Create a new AppDomain, with the current directory as the base.
Console::WriteLine(S"Current Directory: {0}",Environment::CurrentDirectory);
AppDomainSetup* mySetupInfo = new AppDomainSetup();
mySetupInfo->ApplicationBase = domainDir;
mySetupInfo->ApplicationName = executableNameNoExe;
mySetupInfo->LoaderOptimization = LoaderOptimization::SingleDomain;
AppDomain* myDomain = AppDomain::CreateDomain(executableNameNoExe,
0, mySetupInfo);
Console::WriteLine(S"Creating a new AppDomain '{0}'...",executableNameNoExe);
Console::WriteLine(S"-- Base Directory = '{0}'",myDomain->BaseDirectory);
Console::WriteLine(S"-- Shadow Copy? = '{0}'", __box(myDomain->ShadowCopyFiles));
Console::WriteLine(S"---");
Type* myFCType = ADDyno::CreateADynamicAssembly(&curDomain,
executableNameNoExe);
Console::WriteLine(S"Loading '{0}' from '{1}'...",executableName,myDomain->BaseDirectory);
BindingFlags bFlags = static_cast<BindingFlags>
(BindingFlags::Public | BindingFlags::CreateInstance | BindingFlags::Instance);
Object* myObjInstance = myDomain->CreateInstanceAndUnwrap(executableNameNoExe,
executableNameNoExe, false, bFlags,
0, 0, 0, 0, 0);
Console::WriteLine(S"Executing method 'CountLocalFiles' in {0}...",myObjInstance);
Object* temp4 [] = 0;
myFCType->InvokeMember(S"CountLocalFiles", BindingFlags::InvokeMethod, 0,
myObjInstance, temp4);
}
[JScript] JScript のサンプルはありません。Visual Basic、C#、および C++ のサンプルを表示するには、このページの左上隅にある言語のフィルタ ボタン をクリックします。
必要条件
プラットフォーム: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 ファミリ
.NET Framework セキュリティ:
- FileIOPermissionAccess (アセンブリの場所にアクセスするために必要なアクセス許可)PathDiscovery (関連する列挙体)
- FileIOPermissionAccess (アセンブリ マニフェストを格納しているファイルを読み取るために必要なアクセス許可)Read (関連する列挙体)
- WebPermission (アセンブリがローカルでない場合にアセンブリの場所にアクセスするために必要なアクセス許可)
- SecurityPermission (デリゲートのインスタンスの作成時にアンマネージ コードを呼び出すために必要なアクセス許可)SecurityPermissionFlag/UnmanagedCode (関連する列挙体)
- ReflectionPermission (すべての型のメンバに対して操作を呼び出すために必要なアクセス許可)ReflectionPermissionFlag/MemberAccess (関連する列挙体)
- ReflectionPermission (Type.InvokeMember などの機構を通じて遅延バインディングが呼び出されるときに必要なアクセス許可) ReflectionPermissionFlag.MemberAccess (関連する列挙体)
参照
AppDomain クラス | AppDomain メンバ | System 名前空間 | AppDomain.CreateInstanceAndUnwrap オーバーロードの一覧 | CreateInstance