0
Type.GetType("System.ComponentModel.DataAnnotations.KeyAttribute");
nullを返すのですか?
Type.GetType("System.ComponentModel.DataAnnotations.KeyAttribute");
nullを返すのですか?
あなたは修飾アセンブリ名を見つける方法
完全修飾アセンブリ名を使用し@Sinalrコメント
System.ComponentModel.DataAnnonations.dll
Type.GetType("System.ComponentModel.DataAnnotations.KeyAttribute, System.ComponentModel.DataAnnotations, Version=4.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35");
はそれが役に立てば幸い:
Console.WriteLine(typeof(System.ComponentModel.DataAnnotations.KeyAttribute).AssemblyQualifiedName.ToString());
その後、アセンブリ名からタイプを取得することができます。
ありがとうございます –
'System.ComponentModel.DataAnnotations.dll'を参照していますか? – Sinatr
http://stackoverflow.com/questions/1825147/type-gettypenamespace-a-b-classname-returns-nullの重複の可能性 –