Hi guys,
I have so many parameters like this code and seems repetitive, I wonder whether I can write in simpler and more elegant ways.
I have so many parameters like this code and seems repetitive, I wonder whether I can write in simpler and more elegant ways.
Code:
If (OwnerCode != Null)
{
OwnerCode = value1;
}
else
{
OwnerCode = string.empty;
}
If (selectedCode != Null)
{
selectedCode = value2;
}
else
{
selectedCode = string.empty;
}