本文介绍了如何在c#中获取gpt分区信息?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
如何在c#中获取gpt分区信息?喜欢隐藏?属性? type?
how to get gpt partition information in c# ? like hidden ? attributes ? type ?
推荐答案
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.IO;
namespace ConsoleApplication1
{
public class Point
{
public Double Lat { get; set; }
public Double Lng { get; set; }
}
class Program
{
static void Main(string[] args)
{
DriveInfo[] drives = DriveInfo.GetDrives();
foreach (DriveInfo drive in drives)
{
Console.WriteLine("Name:{0}",drive.Name);
if (drive.IsReady)
{
Console.WriteLine("Size:{0}",drive.TotalSize);
Console.WriteLine("AvailableFreeSpace:{0}", drive.AvailableFreeSpace);
Console.WriteLine("DriveFormat:{0}", drive.DriveFormat);
Console.WriteLine("DriveType:{0}", drive.DriveType);
Console.WriteLine("TotalFreeSpace:{0}", drive.TotalFreeSpace);
Console.WriteLine("VolumeLabel:{0}", drive.VolumeLabel);
}
Console.ReadLine();
}
}
}
}
这篇关于如何在c#中获取gpt分区信息?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!