I think that the 'return Statut' calls Statut again and again (infinitely or until an overflow error). This blocks your application.
You should return something else. (Maybe 'return CloseOn'?).
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Hi, I have the class model below and when the condition DTb is verified Statut take the "Open".
When the Status of the DTb changes my app is blocked. Is not possible to use dev tool because the application is blocked.
public string CloseOn { get; private set; }
public string Statut
{
get
{
if (DTb != "Validated")
{
string var1;
var1 = "Open";
return var1;
}
return Statut;
}
set
{
if (DTb == "Validated")
{
CloseOn = "Closed";
}
}
}
Is the model class I wrote correct?
Have you an idea why my application is blocked ?
Thanks in advance
I think that the 'return Statut' calls Statut again and again (infinitely or until an overflow error). This blocks your application.
You should return something else. (Maybe 'return CloseOn'?).
You have to understand the code you've shared is nonsensical. Therefore, the community is unable to infer your intent from the code. Please explain the use case and perhaps the community can provide a logical approach.
The C# programming guide has a section on properties which might prove helpful.