title: Using the value of a variable to set the visiblity of a Panel
body: <p>Hello all I am slowly learning c#, and I have this problem:</p>
  
  <p>I want to make a function that sets all panels not visible and then set one as visible given to me from a string variable.</p>
  
  <pre><code>public void setMeVisible(string PanelName)
  {
      PageMainScreen.Visible = false;
  
      PageNewRegistration.Visible = false;
  
      PageSelectedPatient.Visible = false;
  
      ["PanelName"].Visible = true;  // in this line I want to set the value of
      //  PanelName.Visible=true.
      // what is the format that I must put PanelName?
  }
  </code></pre>