R
Rick
I have a main for frmMain and another form formTest.
I want to set a value of a property in frmMain and then access that value in
frmTest.
I am able to set the property in frmMain as:
MyClass myClass = new MyClass();
myClass.MyProperty = "My New Value";
But, I can't retrieve this value in frmTest; this returns blank:
MyClass myClass = new MyClass();
string MyReturnedValue = myClass.MyProperty;
How do I do it?
******** sample class *********
using System;
using System.Collections.Generic;
using System.Text;
namespace MyApplication
{
class MyClass
{
private string myPropertry;
public string MyProperty
{
get { return myPropertry; }
internal set { myPropertry = value; }
}
}
}
I want to set a value of a property in frmMain and then access that value in
frmTest.
I am able to set the property in frmMain as:
MyClass myClass = new MyClass();
myClass.MyProperty = "My New Value";
But, I can't retrieve this value in frmTest; this returns blank:
MyClass myClass = new MyClass();
string MyReturnedValue = myClass.MyProperty;
How do I do it?
******** sample class *********
using System;
using System.Collections.Generic;
using System.Text;
namespace MyApplication
{
class MyClass
{
private string myPropertry;
public string MyProperty
{
get { return myPropertry; }
internal set { myPropertry = value; }
}
}
}