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

java - How to print docx and pdf? -

qml - Is it possible to implement SystemTrayIcon functionality in Qt Quick application -

java - IntelliJ to move a class along with conflicted classes to a new package? -