kcherr1 / CSharp-Eval

http://www.csharp-eval.com
12 stars 4 forks source link

Define String variable #1

Open hazemElhasan opened 10 years ago

hazemElhasan commented 10 years ago

try to eval for example this sentence string x = "ffffff"
the method TypeAssignMatch in CSharpEval\Exps\TypeExp.cs throw exception

spartas commented 10 years ago

It's superfluous (and potentially catastrophic) to specify the types in assignment. .NET reflection will infer the type based on its value and assign it the correct type in the symbol table. Instead, try to use the following:

x = "ffffff"