2
I have a class Table:
public class Mesa
{
public int Cdmesa { get; set; }
public int Flsituacao { get; set; }
public string Status { get; set; }
}
I would like to return the Status with the following conditions:
If Flsituacao = 1 return Status "FREE"
If Flsituacao = 2 return Status "BUSY"
It is possible to do this directly in the class?
Can you put other relevant parts of the class? I can answer this, but it will be "lucky".
– Maniero
The class is very large and I can’t copy because it’s on another computer without internet. What else would be relevant?
– leopiazzoli
I said relevant parts. I gave an answer, but only with this I don’t know if it’s right. Or you can give more details. Note that I did what seems to be what you want, but it’s not right, I don’t know what you should do with the
set
. See if you think you need to change something in the answer.– Maniero