Click here to Skip to main content
15,884,099 members
Home / Discussions / C#
   

C#

 
GeneralRe: Multiple try blocks in c# 2.0 Pin
OriginalGriff1-Apr-14 7:56
mveOriginalGriff1-Apr-14 7:56 
GeneralRe: Multiple try blocks in c# 2.0 Pin
BobJanova1-Apr-14 23:29
BobJanova1-Apr-14 23:29 
AnswerRe: Multiple try blocks in c# 2.0 Pin
Deflinek1-Apr-14 5:15
Deflinek1-Apr-14 5:15 
GeneralRe: Multiple try blocks in c# 2.0 Pin
OriginalGriff1-Apr-14 8:25
mveOriginalGriff1-Apr-14 8:25 
GeneralRe: Multiple try blocks in c# 2.0 Pin
Deflinek1-Apr-14 23:51
Deflinek1-Apr-14 23:51 
GeneralRe: Multiple try blocks in c# 2.0 Pin
OriginalGriff2-Apr-14 0:04
mveOriginalGriff2-Apr-14 0:04 
AnswerRe: Multiple try blocks in c# 2.0 Pin
GuyThiebaut2-Apr-14 2:20
professionalGuyThiebaut2-Apr-14 2:20 
QuestionHow to check a field/property is existing in Win32_DiskDrive ? Pin
taibc1-Apr-14 0:30
taibc1-Apr-14 0:30 
Hi everyone,

I am using below codes to get information from HardDisk.

C#
ManagementObjectSearcher HardwareQuerySearcher = null;

HardwareQuerySearcher = new ManagementObjectSearcher("SELECT * FROM Win32_DiskDrive");

 foreach (ManagementObject hard in HardwareQuerySearcher.Get())
 {
      Hard hdd = new Hard();
      hdd.Model = hard["Model"].ToString();
      hdd.Type = hard["InterfaceType"].ToString();
      hdd.Type = hard["SerialNumber"].ToString();
 }


Do you know how to list/or show all fields/properties that existing in this query ?

For example: I am want to know wherether the field "SerialNumber" existing or not ?

Thanks and regards,

Tai
AnswerRe: How to check a field/property is existing in Win32_DiskDrive ? Pin
Simon_Whale1-Apr-14 1:18
Simon_Whale1-Apr-14 1:18 
GeneralRe: How to check a field/property is existing in Win32_DiskDrive ? Pin
taibc1-Apr-14 15:47
taibc1-Apr-14 15:47 
AnswerRe: How to check a field/property is existing in Win32_DiskDrive ? Pin
Wayne Gaylard1-Apr-14 1:21
professionalWayne Gaylard1-Apr-14 1:21 
GeneralRe: How to check a field/property is existing in Win32_DiskDrive ? Pin
taibc1-Apr-14 15:47
taibc1-Apr-14 15:47 
GeneralRe: How to check a field/property is existing in Win32_DiskDrive ? Pin
Simon_Whale1-Apr-14 22:40
Simon_Whale1-Apr-14 22:40 
GeneralRe: How to check a field/property is existing in Win32_DiskDrive ? Pin
taibc2-Apr-14 17:59
taibc2-Apr-14 17:59 
Questionhow i can remove the current row..? the record is not yet saved on the database..the remove button is exist in every row of a repeater.. Pin
Member 1058077031-Mar-14 23:14
Member 1058077031-Mar-14 23:14 
QuestionC# new tab dynamic Pin
antrock10131-Mar-14 23:09
antrock10131-Mar-14 23:09 
AnswerRe: C# new tab dynamic Pin
Richard MacCutchan31-Mar-14 23:30
mveRichard MacCutchan31-Mar-14 23:30 
GeneralRe: C# new tab dynamic Pin
antrock1011-Apr-14 0:02
antrock1011-Apr-14 0:02 
GeneralRe: C# new tab dynamic Pin
Richard MacCutchan1-Apr-14 0:28
mveRichard MacCutchan1-Apr-14 0:28 
GeneralRe: C# new tab dynamic Pin
antrock1011-Apr-14 2:03
antrock1011-Apr-14 2:03 
GeneralRe: C# new tab dynamic Pin
antrock1011-Apr-14 2:37
antrock1011-Apr-14 2:37 
GeneralRe: C# new tab dynamic Pin
Eddy Vluggen1-Apr-14 5:02
professionalEddy Vluggen1-Apr-14 5:02 
GeneralRe: C# new tab dynamic Pin
Richard MacCutchan1-Apr-14 6:37
mveRichard MacCutchan1-Apr-14 6:37 
QuestionHow to Mark different shapes on Image in asp.net web application Pin
codeprojmar201331-Mar-14 20:50
codeprojmar201331-Mar-14 20:50 
AnswerRe: How to Mark different shapes on Image in asp.net web application Pin
OriginalGriff31-Mar-14 21:39
mveOriginalGriff31-Mar-14 21:39 

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.