title: how to convert windows.forms.keys code to integer
body: <p>i have a project in which i have assigned some functions to single characters(e.g. Keyboard Key "H" will do high pass filtering). </p>
  
  <p>Now To get "H" as an output i have created a down event which hopefully pick up the keys are down and calls the function with an integer value. However I get an error when i try to compare the input value with an integer value in the function. The following is my code...</p>
  
  <pre><code>public static event DownEventHandler Down;
  public static delegate void DownEventHandler(string Key);
  Down(FunctionChar((Keys)lParam.Code));    // lParam.code is an integer value.
  
  private string FunctionChar(Keys e)
  {
  
        if(e &gt;=65 &amp;&amp; e&lt;=90){
  
            if (Control.IsKeyLocked(Keys.CapsLock) || ((Control.ModifierKeys !=0) &amp;&amp; (Keys.Shift) != 0))
              {
                  return e.ToString;
              }
              else
              {
                  return e.ToString.ToLower;
              }
  </code></pre>
  
  <p>}</p>
  
  <p>I assume that this function will give me the output a string either "G" or "g". as mentioned before i want to use it in further functionality.</p>
  
  <p>However it gives me error as following.</p>
  
  <pre><code>Operator '&gt;=' cannot be applied to operands of type 'System.Windows.Forms.Keys' and 'int'
  </code></pre>
  
  <p>I know one of the solution is to use SWITCH statement but i want to use if statement and not switch.</p>
  
  <p>Can some one tell me - what is the problem? What values does "e" posses and how can i convert it to (Int) so i can use it in the IF statement.</p>