Beginer getting error CS0119: Expression denotes a `type', where a `variable', `value' or `method group' was expected

So I’m a begging to learn C# I’m taking a visual basic class and wanted to jump right into c# because I find the best way to learn is by doing it. Any way I’m having a a problem I’m trying to design an adventure puzzle horror game like amnesia and I’m trying to design a basic key door system I got the error in the key script.

`using UnityEngine;
using System.Collections;

public class Key : MonoBehaviour {
// Use this for initialization
void Start () {

	bool Keyget = false;
}

// Update is called once per frame
void Update () {
switch (e.KeyCode)
{
    case Keys.Enter:
        Keyget = true;
        Key.visible = false;
}
		
}

}
`
What’s going wrong?

Your e is an Event, I bet that you have read tutorials but did not follow it completely.

A possible fix to your problem

void Update () {

   Event e = Event.current;

   if( e.isKey ) {
      switch (e.KeyCode)
      {
          case KeyCode.Enter:
              Keyget = true;
              Key.visible = false;
      }
   }
}

I get a parsing error with your code