I have a a window class with a hidden textbox. I am using a constructor with 1 parameter (string). And if that parameter = "a" I want to make the textbox visible.
public partial class Window1 : Window
{
public Window1(string x)
{
if(x == "a") this.TBOcena.Visibility = System.Windows.Visibility.Visible;
}
}
but it seems i am doing something wrong because it does not work.
I am getting an exception
"An unhandled exception of type 'System.NullReferenceException'"
Not sure how to fix it and not even sure what to look for in google : /