How do I use this query in vb.net - I cannot get my head around converting from c# to vb.net -


objectquery query = new objectquery("select * win32_battery");  foreach (managementobject o in new managementobjectsearcher(query).get()) {     uint level = (uint)o.properties["estimatedchargeremaining"].value; }  

simple in c# - cannot head around in vb.net -> tried online , manual conversion , keep getting stuck

for each o managementobject in new managementobjectsearcher(query2) <- getting stuck @ point think -> not sure how .get

if can me convert wonderful - preferably full conversion have found parts of answer on , seem 'miss step'

pretty you'd expect:

dim query new objectquery("select * win32_battery")  each o managementobject in new managementobjectsearcher(query).get()     dim level = cuint(o.properties("estimatedchargeremaining").value) next 

Comments

Popular posts from this blog

What can cause "Required Package 'IndyCore' not found" when compiling a Delphi 2010 project? -

Change the color of an oval at click in Java AWT -