Click here to Skip to main content
15,920,217 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to Use DataSet in C# Pin
Manas Bhardwaj21-Aug-08 4:37
professionalManas Bhardwaj21-Aug-08 4:37 
GeneralRe: How to Use DataSet in C# Pin
mghiassi21-Aug-08 4:51
mghiassi21-Aug-08 4:51 
GeneralRe: How to Use DataSet in C# Pin
led mike21-Aug-08 5:05
led mike21-Aug-08 5:05 
AnswerRe: How to Use DataSet in C# Pin
PIEBALDconsult21-Aug-08 4:39
mvePIEBALDconsult21-Aug-08 4:39 
Question[Message Deleted] Pin
subramanyeswari21-Aug-08 2:35
subramanyeswari21-Aug-08 2:35 
AnswerRe: reading dat file Pin
lisan_al_ghaib21-Aug-08 2:41
lisan_al_ghaib21-Aug-08 2:41 
QuestionUDP an C# Pin
Stephen Lintott21-Aug-08 2:33
Stephen Lintott21-Aug-08 2:33 
AnswerRe: UDP an C# Pin
leppie21-Aug-08 2:48
leppie21-Aug-08 2:48 
GeneralRe: UDP an C# Pin
Stephen Lintott21-Aug-08 2:52
Stephen Lintott21-Aug-08 2:52 
GeneralRe: UDP an C# Pin
leppie21-Aug-08 3:10
leppie21-Aug-08 3:10 
GeneralRe: UDP an C# Pin
Stephen Lintott21-Aug-08 3:12
Stephen Lintott21-Aug-08 3:12 
QuestionSelecting a combobox item from Xml Pin
chanzeb21-Aug-08 2:29
chanzeb21-Aug-08 2:29 
QuestionFinding a screens refresh rate Pin
Anthony Mushrow21-Aug-08 2:26
professionalAnthony Mushrow21-Aug-08 2:26 
AnswerRe: Finding a screens refresh rate Pin
JoeRip21-Aug-08 2:41
JoeRip21-Aug-08 2:41 
AnswerRe: Finding a screens refresh rate Pin
JoeRip21-Aug-08 2:47
JoeRip21-Aug-08 2:47 
AnswerRe: Finding a screens refresh rate Pin
JoeRip21-Aug-08 2:59
JoeRip21-Aug-08 2:59 
AnswerRe: Finding a screens refresh rate Pin
JoeRip21-Aug-08 3:11
JoeRip21-Aug-08 3:11 
GeneralRe: Finding a screens refresh rate Pin
Anthony Mushrow21-Aug-08 4:38
professionalAnthony Mushrow21-Aug-08 4:38 
QuestionIs there a way? Pin
Silvyster21-Aug-08 2:24
Silvyster21-Aug-08 2:24 
AnswerRe: Is there a way? Pin
SomeGuyThatIsMe21-Aug-08 2:29
SomeGuyThatIsMe21-Aug-08 2:29 
AnswerRe: Is there a way? Pin
Manas Bhardwaj21-Aug-08 2:31
professionalManas Bhardwaj21-Aug-08 2:31 
AnswerRe: Is there a way? Pin
lisan_al_ghaib21-Aug-08 2:34
lisan_al_ghaib21-Aug-08 2:34 
AnswerRe: Is there a way? Pin
Samer Aburabie21-Aug-08 15:13
Samer Aburabie21-Aug-08 15:13 
Of course you can ... alot of ways to do so and WMI is one of them ... use the System.Management namespace to help you so ... as follows:

ArrayList list = new ArrayList();
            using (ManagementObjectSearcher DiskSearch = new ManagementObjectSearcher(new SelectQuery("Select * from Win32_LogicalDisk")))
            {
                using (ManagementObjectCollection moDiskCollection = DiskSearch.Get())
                {
                    foreach (ManagementObject mo in moDiskCollection)
                    {
                        list.Add(mo["Name"].ToString ());
                        MessageBox.Show(mo["Name"].ToString());
                        mo.Dispose();
                    }
                }
            }

Dont forget to add a reference in your project to System.Management dll and you will get all the drives .. for more properties go to this link to get them (other than the Name property used here):

http://msdn.microsoft.com/en-us/library/aa394173.aspx[^]

Enjoy !

Note: If you found this answer useful please indicate that so other would know so.

Sincerely Samer Abu Rabie

Software Engineer

QuestionWizards... again. Pin
V.21-Aug-08 2:20
professionalV.21-Aug-08 2:20 
Questiona really newbie, quick and easy question... Pin
laziale21-Aug-08 2:08
laziale21-Aug-08 2:08 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.