Bonsoir,

j'essaye de faire un type casting de variable Type.

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
3
4
5
6
 
   Type typ = utils.StringToType(_sentence.currentWord);
   Word tmp = (Word)Activator.CreateInstance(typ);
   Type containerType = utils.StringToType(tmp.putWord);
 
   this.pushStack(((containerType)tmp).putWord);
la dernière ligne me retourne :

Code : Sélectionner tout - Visualiser dans une fenêtre à part
1
2
 
Error 1 The type or namespace name 'containerType' could not be found (are you missing a using directive or an assembly reference?)	D:\_SRC_\VS_C#\_DB_\Dalbe\Components\Modules\Lexer.cs	50	38	Dalbe
En late binding ça devrait marcher mais le compilateur refuse d'executer,, pourquoi ?