c# - Access win32_processor propertry "Family" Dictionarie -


i work on small project want read cpu information. using managementobjectsearcher, managementobjectcollection , managementobjects.

//cpuinfo managementobjectcollection, method  foreach (managementobject obj in cpuinfo) { try {      cpufamily = obj["family"].tostring();      console.writeline("family: {0}", obj["family"]); } catch (exception e) {      cpufamily = "not available"; } 

my problem cpu family gets value 198. far research has gone found out key of dictionary, see: https://msdn.microsoft.com/en-us/library/aa394373(v=vs.85).aspx

now problem is, don't know how access dictionary. haven't found useful information far.. id access dictionary, no matter key get, want corresponding value. (i thought hard coding keys , values dictionary, if changes on time...)

thanks!

another question! {0} in console output means? found on net..

link edited

the managementobject "caption" contains family..


Comments

Popular posts from this blog

angular - Is it possible to get native element for formControl? -

unity3d - Rotate an object to face an opposite direction -

javascript - Why jQuery Select box change event is now working? -