呼び出し元のAssemblyからタイトル名・会社名を取得する
private Assembly AssemblyData = System.Reflection.Assembly.GetEntryAssembly();
// タイトル名
AssemblyData.GetName().Name;
// 会社名
GetCustomAttribute<AssemblyCompanyAttribute>().Company;
private T GetCustomAttribute<T>() where T : Attribute
{
return (T)Attribute.GetCustomAttribute(AssemblyData, typeof(T));
}
ディスカッション
コメント一覧
まだ、コメントがありません