G
Guest
I have a string which has been assigned the value of "OneTwoThree". I have
created a property because I want to be able to assign a new value to this
string.
I have:
string numbers = "OneTwoThree";
public string StringToCompare
{
get
{
return numbers;
}
set
{
numbers = value;
}
}
Obviously, this doesn't work.
My program will start up automatically when the user opens their PC and
won't give them the opportunity to set the value of numbers straight away.
Instead, they will have to enter the string "OneTwoThree" to make the form
visible and enable them to change it's value.
Is there a way to accomplish this?
created a property because I want to be able to assign a new value to this
string.
I have:
string numbers = "OneTwoThree";
public string StringToCompare
{
get
{
return numbers;
}
set
{
numbers = value;
}
}
Obviously, this doesn't work.
My program will start up automatically when the user opens their PC and
won't give them the opportunity to set the value of numbers straight away.
Instead, they will have to enter the string "OneTwoThree" to make the form
visible and enable them to change it's value.
Is there a way to accomplish this?