System.Environment.GetLogicalDrives C# (CSharp) Method

GetLogicalDrives() public static method

public static GetLogicalDrives ( ) : string[]
return string[]
        public static string[] GetLogicalDrives() => DriveInfoInternal.GetLogicalDrives();

Usage Example

Beispiel #1
0
        //Read various values
        void ReadValues()
        {
            //Check whether x64
            checkBox1.Checked = Env.Is64BitOperatingSystem;
            //Get all logical drives
            comboBox1.Items.AddRange(Env.GetLogicalDrives());
            //Get the date of the start of the computer
            var uptime = TimeSpan.FromTicks(Env.TickCount);

            monthCalendar1.TodayDate = DateTime.Now.Subtract(uptime);
            //Add some things like username
            listBox1.Items.Add("User " + Env.UserName);
            listBox1.Items.Add("Domain " + Env.UserDomainName);
            comboBox1.SelectedIndex = 0;
        }
All Usage Examples Of System.Environment::GetLogicalDrives