J
JezB
How can I programatically obtain the name of the assembly that the code is
executing in ?
I've tried
System.Reflection.Assembly.GetExecutingAssembly().FullName
but this returns something like
"WorkPlace.Presentation.CommonLib, Version=1.0.1496.30348,
Culture=neutral, PublicKeyToken=null"
whereas what I'm after is just the "WorkPlace.Presentation.CommonLib" part.
Of course I could read up to the first comma but I'd like something cleaner.
I need this path to plug into a resource file name that I want to scan which
is embedded into my project :-
// TODO: How can I get the first part of this programmatically?
string ResFile =
string.Format("WorkPlace.Presentation.CommonLib.Messages_{0}",groupID);
ResourceManager rm = new
ResourceManager(ResFile,System.Reflection.Assembly.GetExecutingAssembly().);
ResourceSet rs =
rm.GetResourceSet(System.Threading.Thread.CurrentThread.CurrentUICulture,tru
e,true);
IDictionaryEnumerator id = rs.GetEnumerator();
// etc
executing in ?
I've tried
System.Reflection.Assembly.GetExecutingAssembly().FullName
but this returns something like
"WorkPlace.Presentation.CommonLib, Version=1.0.1496.30348,
Culture=neutral, PublicKeyToken=null"
whereas what I'm after is just the "WorkPlace.Presentation.CommonLib" part.
Of course I could read up to the first comma but I'd like something cleaner.
I need this path to plug into a resource file name that I want to scan which
is embedded into my project :-
// TODO: How can I get the first part of this programmatically?
string ResFile =
string.Format("WorkPlace.Presentation.CommonLib.Messages_{0}",groupID);
ResourceManager rm = new
ResourceManager(ResFile,System.Reflection.Assembly.GetExecutingAssembly().);
ResourceSet rs =
rm.GetResourceSet(System.Threading.Thread.CurrentThread.CurrentUICulture,tru
e,true);
IDictionaryEnumerator id = rs.GetEnumerator();
// etc