As I have already done, I have this piece of code:
private string opt;// create a property
public string optionInterval
{
get
{
return opt;
}
set
{
opt = value;
}
}
How can I change the opt to an integer?
Especially in the set part?
Using Auto-Implemented Properties
Here’s a working version of GianT971’s answer: