Get .CFG or .INI filename based on current application name


/ Published in: C#
Save to your folder(s)

Single-line expression provides .CFG filename based on application name.
The .CFG file is in the same directory as the application.
Application.ExecutablePath returns the app's path, with directory, including the trailing .EXE.
Regex is used to replace the .EXE with a .CFG or .INI

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.