|
|
|||||||||
|
|||||||||
|
|||||||||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Free Web 2.0 Code Generator! Generate data entry and reporting .NET Web apps in minutes. Quickly create visually stunning, feature-rich apps that are easy to customize and ready to deploy. Download Now!
|
|
#1
|
|||
|
|||
|
Compile time error or runtime error?
Hello everyone,
Could anyone let me know why compiler can not make runtime error report in the following code, other than throw cast exception during runtime? Code:
static void Main()
{
int i = 100;
object b = i;
long l = (long)b; // why compiler can not make type check here?
return;
}
thanks in advance, George |
![]() |
| Viewing: Dev Articles Community Forums > Programming > .NET Development > Compile time error or runtime error? |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|
|