Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subclass failing with Stack Overflow. Help?
Message
 
To
24/03/2004 14:34:58
John Baird
Coatesville, Pennsylvania, United States
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00889378
Message ID:
00889382
Views:
19
You are calling the property in an infinate loop. A property needs a field to hold its state
private bool _isLoggedIn;
public bool lIsLoggedIn {
    get {
      return _isLoggedIn;
  }
  set {
      _isLoggedIn = value;
     }
}
>The code below is in the class which creates my subclasses of the .net controls. This builds fine, but stack overflows on the line: lIsLoggedIn = value. Am I doing something wrong?
>
>Thanks in advance.
>
>
>public class frmBase : Quay.Base.frmBase
>{
>   public bool lIsLoggedIn {
>      get {
>         return lIsLoggedIn;
>      }
>
>      set {
>         lIsLoggedIn = value;
>      }
>   }
>
>   public frmBase() {
>      this.Font = new Font(“Arial”, 8)’;
>      this.lIsLoggedIn = false;
>   }
>}
>
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform