I think what you need is:
Dictionary<eTypeVar, Type> _Types = new Dictionary<eTypeVar, Type> {
{ eTypeVar.Int, typeof(Int32) },
{ eTypeVar.Char, typeof(Char) },
{ eTypeVar.Float, typeof(Single) }
};
public Boolean Check(eTypeVar type, Object value)
{
return value.GetType() == _Types[type];
}
You cannot convert a variable into a type for another variable declaration. You should rethink your design. Anyway it doesn't make sence what you are doing. If you know that you want to use a int, why not declare it:
String name = "int";
int value = 1;
If you want to have dynamic code for some reasons you could use Reflection and a generic method.
public void DoSomething<T>(T value)
{
....
}
Then you can construct the method at runtime using reflection and invoke it. But at this time i think you need more basics of C# to work with this features.