クラス ライブラリ プロジェクトのファイルにアクセスする Windows アプリケーションがあります。
public static class Global
{
private static ResourceManager ResourceManager { get; set; }
static Global ()
{
ResourceManager = new ResourceManager("MyClassLibraryProject.Resource", Assembly.GetExecutingAssembly());
}
private static string GetValue (string name)
{
return (ResourceManager.GetString(name, Options.CultureInfo));
}
public static string ProductName
{
get
{
return (GetValue(MethodBase.GetCurrentMethod().Name.Replace("get_", "")));
}
}
}
`
ProductName
この例では、プロパティを手動で作成しました。リソース ファイルの各行の厳密に型指定された名前に簡単にアクセスする方法はありますか?