BrowsableAttribute using a bool has a bug

  • Thread starter Thread starter John Owens
  • Start date Start date
J

John Owens

/// <summary>
/// </summary>
bool printFlag;
[Browsable(true), Category("Misc")]
public bool Print
{
get { return this.printFlag; }
set { this.printFlag = value; }
}

I'm using this but when I try to change a value it fires a SEHException in
the main function.

Is there something else I have to do?

Thanks.
 
John,

I believe the problem is not in the Browsable attribut, but rather what
happens in the code when you set this printFlag.
I don't believe adding this attribute can cause such problem.
 
John,
I believe the problem is not in the Browsable attribut, but rather what
happens in the code when you set this printFlag.
I don't believe adding this attribute can cause such problem.

The set part is just setting a bool so it's not that.
 
John,

I'm not talking the setter of the property here. I believe you use this flag
somewhere in your program and perform some actions upon it. I think this
places are where you should look at.

You know your code, but the snipped that you've posted don't have any reason
to throw that exception.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top