G
Guest
Hi,
i would like to load strings included as embbeded resources in my assembly.
In MSDN i found lot of information about localizing applications, loading
culture specific rousources from .resource files or sattelite assemblies and
so on...
But i did not find any simple concept how to handle non localized resources
included in assmbly itself. The best way i found is to create separate .resx
file, include it to my assebmly as embbeded resource and when some string is
needed do something like this:
Stream śtream =
System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("aaa.resfile.resources");
ResourceReader rd = new ResourceReader(stream);
IDictionaryEnumerator en = rd.GetEnumerator();
string str;
while (en.MoveNext())
if (en.Key != "SearchedString1")
{
str = en.Value;
break;
}
if (str != null) ...
Is't there any other (simplier) way?
i would like to load strings included as embbeded resources in my assembly.
In MSDN i found lot of information about localizing applications, loading
culture specific rousources from .resource files or sattelite assemblies and
so on...
But i did not find any simple concept how to handle non localized resources
included in assmbly itself. The best way i found is to create separate .resx
file, include it to my assebmly as embbeded resource and when some string is
needed do something like this:
Stream śtream =
System.Reflection.Assembly.GetExecutingAssembly().GetManifestResourceStream("aaa.resfile.resources");
ResourceReader rd = new ResourceReader(stream);
IDictionaryEnumerator en = rd.GetEnumerator();
string str;
while (en.MoveNext())
if (en.Key != "SearchedString1")
{
str = en.Value;
break;
}
if (str != null) ...
Is't there any other (simplier) way?