G
Guest
Hi,
i found an interesting problem when using overloaded functions...
I declare two methods:
public static void ShowError(Exception exp) {...}
and
public static void ShowError(SqlCeException exp) {...}
when i call ShowError with parater of type SqlCeException, then compiler's
overload resulution determine to invoke ShowError(Exception) instead of
ShowError(SqlCeException)!
As written in C# specification 1.2, compiler should find the method that
BEST matches
arguments, should't it?
i found an interesting problem when using overloaded functions...
I declare two methods:
public static void ShowError(Exception exp) {...}
and
public static void ShowError(SqlCeException exp) {...}
when i call ShowError with parater of type SqlCeException, then compiler's
overload resulution determine to invoke ShowError(Exception) instead of
ShowError(SqlCeException)!
As written in C# specification 1.2, compiler should find the method that
BEST matches
arguments, should't it?