Hello there.
Should I assign? Can you please explain why or why not, the reasons, please?
Warning:
Code:
in first case, with set, does it assign it automatically? for that field, no warning generated. for the second property, there is a warning.
Thanks, and sorry if this question is silly
Should I assign? Can you please explain why or why not, the reasons, please?
Warning:
Code:
is never assigned to, and will always have its default value null
Code:
class f_Definition
{
string _definitionAcronym;
string _definitionName;
double[] _definitionValue = new double[4];
DefinitionValue _DefValue;
//properties
public string DefinitionAcronym
{
set { _definitionAcronym = value; }
get { return _definitionAcronym; }
}
public string DefinitionName
{
get { return _definitionName; }
}
Thanks, and sorry if this question is silly
Comment