Which of the following is the correct syntax to get the application startup path in C#?
A) Application.StartPath
B) Application.GetStartPath()
C) Application.StartupPath
D) Application.Path
Interviews2 answers
Which of the following is the correct syntax to get the application startup path in C#?
2 Answers
C) Application.StartupPath
The correct syntax to get the application startup path in C# is Application.StartupPath. This property returns a string containing the full path to the directory that contains the executable file for the current application.
Tuhin PaulPosted May 7, 2023, 2:03 PM EDT
string path = AppDomain.CurrentDomain.BaseDirectory;
Kushal SinghPosted May 2, 2023, 6:13 AM EDT
