用到Environment类里的方法
Code
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication6
{
class Program
{
static void Main(string[] args)
{
string[] logical_drivers = System.Environment.GetLogicalDrives();
foreach(string logical in logical_drivers)
{
Console.WriteLine(logical);
}//end foreach
Console.ReadLine();
}//end Main()
}//end Program
}//end ConsoleApplication6
posted @
2009-08-06 16:17
盈不足
阅读(
187)
评论()
编辑
收藏
举报