Hi i am displaying version value from registry .For fetching value from registry i did the following code.
// Where WrmSpoAgentRoot= @"Software\syscon\Point Monitor\";
string keySpoPath = SpoRegistry.WrmSpoAgentRoot;
RegistryKey regkey = Registry.LocalMachine.OpenSubKey(keySpoPath);
But i want to assign this value in to a property..So i created a property “Wrmversion”.But when i am assigning this value ,,’regkey’ variable is not assigning in to
the property means intellisense is not producing ‘regkey’ variable(The name ‘regkey’ does not exist in the current context)
public string Wrmversion
{
get { return m_wrmversion; }
set { m_wrmversion = value; }
}
private string m_wrmversion = string)regkey.GetValue(
SpoRegistry.regValue_CurrentVersion);
Is there any way to assign value in to property like
Write this assignment inside a constructor.
Let’s suppose this class is named FooBar. You should write: