Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Subclass failing with Stack Overflow. Help?
Message
From
25/03/2004 08:44:33
John Baird
Coatesville, Pennsylvania, United States
 
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00889378
Message ID:
00889554
Views:
20
Thanks for the reply. I looked again at the examples in the book and nowhere do they list a private variable to hold the state. Thanks for the information. It is working as it should. Thanks..

>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
Reply
Map
View

Click here to load this message in the networking platform