ALL,
I have a following code with C#:
public int property
{
set
{
tbText.Text = property.ToString();
}
get
{
return Convert.ToInt32(tbText.Text);
}
}
When I go to the properties Window, I see the message:
Input string was not in the right format.
tbText is a TextBox control on which I am trying to get or set value.
Initially the control is empty.
What am I doing wrong?
Thank you.
You’re looking for the value keyword in your setter.