到目前爲止,我有以下幾點: // Gets all the drives
DriveInfo[] allDrives = DriveInfo.GetDrives();
// checks if any CD-Rom exists in the drives
var cdRomExists = allDrives.Any(x => x.DriveType == DriveType.CDRom
我有DriveInfo類的這個小問題。 我知道錯誤是特定於「的isReady」屬性,但我只是不知道如何界定它.. namespace Csp.Test.ConsoleApp
{
public class Program
{
public static void Main()
{
//Create the server object - Y