The correct way to implement a write only property add in a math class?
A.
B.
C.
D. None of the mentioned
A.
Code:
class math
{
public int add
{
set
{
add = value;
}
}
}
Code:
class math
{
int ad;
public int add
{
set
{
ad = value;
}
}
}
Code:
class math
{
int ad;
public int add
{
get
{
return ad;
}
set
{
ad = value;
}
}
}