c# - Issue with fetching value from registry -


Hello I'm displaying the version value from the registry. To bring value from the registry, I have done the following code.

  // where WrmSpoAgentRoot = @ "software \ syscon \ point monitor"; String Keyspace = Sporitizer. WRMSpoAgentRoot; Registry Regke = Registry.Localachin OpenSub (KeySpot);  

But I want to take this value into property..then I created a property "Wrmversion". But when I am specifying this value, the 'regkey' variable is not assigned in the property property means that the intellisense 'regkey' variable (the name 'regkey' is not present in the current context) is not causing

  public string Wrmversion {get m_wrmversion; } Set {m_wrmversion = value; }} Private string m_wrmversion = string) regkey.GetValue (SpoRegistry.regValue_CurrentVersion);  

Is there a way to specify value in the property

Write this assignment inside a constructor.

Let's say that the name of this class is Fobar. You should write:

  Class FooBar {// Other code is public here FooBar () {m_wrmversion = (string) Regkey.GetValue (SpoRegistry.regValue_CurrentVersion); }}  

Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -