|
|
От: | q__q | |
| Дата: | 16.11.08 10:28 | ||
| Оценка: | |||
using System.Console;
public class Test {
private static x1(i: int) : int { i; }
private static x2(i: string) : string { i; }
public static Main() : void {
mutable x = x1;
WriteLine("calling x1:");
WriteLine(x(100));
WriteLine("assign x2 to x:");
x = (x2 : object) :> int -> int;
WriteLine("assigned");
WriteLine("calling x2:");
WriteLine(x(100));
}
}calling x1:
100
assign x2 to x:
assigned
calling x2:
Необработанное исключение: System.InvalidCastException: Не удалось привести тип
объекта "System.Int32" к типу "System.String".
в Test._N_static_proxy734.apply(Object _N_sp_parm735)
в Test.Main()