-
Dynamic Configuration File Name
I'm writing a dll that uses a configuration file. If I keep the name of the configuration file the same as the assembly (in this case DataCore.dll), is there someway that I can "construct" the name of the configuration without having to hard code the file's name into my DLL?
Laurence -
-
You might try this:
Imports System.Reflection
Dim a As Assembly = Assembly.GetExecutingAssembly
Dim AssemblyName As String = a.GetName.Name
It may, however, return the name of the process (EXE) into which your DLL is loaded, rather than the name of the DLL itself.
Phil Weber
http://www.philweber.com
Please post questions to the forums, where others may benefit.
I do not offer free assistance by e-mail. Thank you!
Similar Threads
-
By Arjuna in forum Database
Replies: 2
Last Post: 07-25-2007, 03:22 AM
-
By JavaFaces in forum Java
Replies: 0
Last Post: 02-12-2006, 06:27 PM
-
By sandhyaharsh in forum Java
Replies: 0
Last Post: 11-15-2005, 06:23 AM
-
By Andrew Prentice in forum Database
Replies: 0
Last Post: 02-15-2002, 01:39 PM
-
By Paul in forum Database
Replies: 0
Last Post: 08-22-2000, 10:54 PM
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
Forum Rules
|
Top DevX Stories
Easy Web Services with SQL Server 2005 HTTP Endpoints
JavaOne 2005: Java Platform Roadmap Focuses on Ease of Development, Sun Focuses on the "Free" in F.O.S.S.
Wed Yourself to UML with the Power of Associations
Microsoft to Add AJAX Capabilities to ASP.NET
IBM's Cloudscape Versus MySQL
|
Bookmarks