GetLogicalDrives() public static method

public static GetLogicalDrives ( ) : string[]
return string[]
示例#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;
        }
示例#2
0
 public IReadOnlyList <string> GetLogicalDrives()
 {
     return(Env.GetLogicalDrives());
 }
示例#3
0
 public static string[] GetLogicalDrives()
 {
     return(Environment.GetLogicalDrives());
 }