Hirdetés

Új hozzászólás Aktív témák

  • yash

    senior tag

    válasz Syncmaster #867 üzenetére

    En magam csinaltam neked egy kis peldat... kis logikvala ra lehet jonni mindenre, amugy eletem elso meghajtokat kezelo programja, Help file nelkul rajottem siman, sajat logikaval, szoval ha hasznalod az agyad, azert annyira nem nehez am! (mod: az Osztaly neve utal ra, hogy eppen masnak akartam neki allni :) , eppen most tanulom a nyelvet csak :B )

    using System;
    using System.Collections.Generic;
    using System.Text;
    using System.IO;

    namespace AutomaticProperties
    {
    class Program
    {
    static void Entrance()
    {

    for (int i = 0; i < DriveInfo.GetDrives().Length; i++)
    {
    if (DriveInfo.GetDrives()[i].IsReady)
    {
    Console.WriteLine("Drive: {0} Volume label: {1}", DriveInfo.GetDrives()[i], DriveInfo.GetDrives()

    [i].VolumeLabel);
    }
    else
    {
    Console.WriteLine("Drive {0} is not ready an can not be read!",DriveInfo.GetDrives()[i]);
    }
    }
    Console.ReadLine();
    }

    static void Main(string[] args)
    {
    try
    {
    Entrance();
    }
    catch (Exception ex)
    {
    Console.WriteLine(ex.Message);
    Console.ReadLine();
    }
    }
    }
    }

    [ Szerkesztve ]

Új hozzászólás Aktív témák