How to get the User Profile path in C#

1 Answer

0 votes
using System;

namespace ConsoleApplication_C_Sharp
{
    class Program
    {
        static void Main(string[] args)
        {
            string s = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);

            Console.WriteLine(s);
        }
    }
}

/*
run:
  
C:\Users\USER

*/

 



answered Jan 14, 2017 by avibootz

Related questions

2 answers 118 views
118 views asked Sep 2, 2023 by avibootz
1 answer 127 views
2 answers 237 views
1 answer 142 views
...