How to get the path to the application in Windows forms, I used the following code, but it says "method not found"
Application.ExecutablePath; Application.StartupPath;
please suggest me if i skip any namespace?
early
This will return the full path to your application.
System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly().Location)
You can do it the same
System.AppDomain.CurrentDomain.BaseDirectory
Add the System.Windows.Forms link and add to the section
System.Windows.Forms
using System.Windows.Forms;
Typically, Application.StartupPath() will indicate the path of the application. Also skip this namespace. System.Windows.Forms
Application.StartupPath()
System.Windows.Forms.Application.StartupPath should return the path to the executable executable.
System.Windows.Forms.Application.StartupPath
Source: https://habr.com/ru/post/886691/More articles:Re-synchronizing with synchronized statements - javaHow to access an attribute of an object as a variable? - javascriptUIWebView and timeouts - iphoneWhen should I use the constructor design pattern? - design-patternshow to use different access to ms - sqlSQLite: how to join tables and present a cursor using SimpleCursorAdapter - androidHow to replace links using lxml and iterlinks - pythonHow to install sqlite3 camcorder on EC2? - ruby-on-railsHow to avoid connecting to an IoC container - c #Simple Slickgrid sorting not working - javascriptAll Articles