c# - Checking if a certain value is in a subkey, then do something -


here trying read currentuser\software\microsoft\visualstudio\12.0 folder. in there subkey called "upgradecheckscheduledtimestamp". if has value of true, want something.

seen many examples, showing if value empty or not. want specific value.

here have been fiddling around far

registrykey regkey = registry.currentuser.opensubkey("software\\microsoft\\visualstudio\\12.0, upgradecheckscheduledtimestamp");  if (regkey != null) {     regkey.getvalue("upgradecheckscheduledtimestamp"); }  console.writeline(regkey); 

you there. remove "upgradecheckscheduledtimestamp" first line of code.

then have either assign value inside if statement variable, or write console when value. if subkey not found, it'll write empty line.

registrykey regkey     = registry.currentuser.opensubkey("software\\microsoft\\visualstudio\\12.0");  if (regkey != null) {     console.writeline(regkey.getvalue("upgradecheckscheduledtimestamp")); } 

Comments

Popular posts from this blog

google api - Incomplete response from Gmail API threads.list -

Installing Android SQLite Asset Helper -

Qt Creator - Searching files with Locator including folder -