string[] drive = Environment.GetLogicalDrives(); string str = ""; foreach (string s in drive) { str += s + "\n"; } MessageBox.Show(str);