2
Reply

Which of the following is the correct syntax to get the application startup path in C#?

Tuhin Paul

Tuhin Paul

1y
1.1k
1
Reply

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

    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.

    string path = AppDomain.CurrentDomain.BaseDirectory;