DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

+ Reply to Thread
Results 1 to 2 of 2
  1. #1
    Join Date
    Feb 2004
    Posts
    111

    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 -

  2. #2
    Join Date
    Nov 2003
    Location
    Portland, OR
    Posts
    8,387
    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

  1. Database not properly created
    By Arjuna in forum Database
    Replies: 2
    Last Post: 07-25-2007, 03:22 AM
  2. Replies: 0
    Last Post: 02-12-2006, 06:27 PM
  3. upload an image file and save on webserver.
    By sandhyaharsh in forum Java
    Replies: 0
    Last Post: 11-15-2005, 06:23 AM
  4. SQL Loader: Dynamic File Names
    By Andrew Prentice in forum Database
    Replies: 0
    Last Post: 02-15-2002, 01:39 PM
  5. Replies: 0
    Last Post: 08-22-2000, 10:54 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


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


Sponsored Links