Search code examples
c#.netfileinfo

Get FileInfo On Itself?


My C# program is in the form of a single .exe file. Therfore, the user can store it anywhere and name it anything. How can I use the FileInfo class to get its Attributes if I don't know the path?


Solution

  • System.Reflection.Assembly.GetExecutingAssembly().Location