私はアセンブリasdf.dllを持っていて、クラス 'Class1'を持っています。クラスのGetTypeについてC#質問
は、どのように私はクラス1のタイプを得ることができますか?
string a = "Class1"; //Class1 is the name of class in asdf.dll
string typeString = typeof(Class1).FullName; // here I only have the string Class1 and not Class Class1
AssemblyName assemblyName = AssemblyName.GetAssemblyName("asdf.dll");
Type type = Type.GetType(typeString + ", " + assemblyName);
クラス名を保持する文字列からクラスの型を取得するにはどうすればよいですか?
...多分そのGoogleのスパイダー/クローラー、ということに気づい 型t = Type.GetType( "asdf.dll.Class1、ASDF .dll "); i.mはtに対してnullになりますか? – SyncMaster