Click here to Skip to main content
15,886,873 members
Home / Discussions / C#
   

C#

 
GeneralRe: Phone Diael in C# Pin
E_Gold4-May-08 18:19
E_Gold4-May-08 18:19 
GeneralRe: Phone Diael in C# Pin
Joachim Kerschbaumer4-May-08 22:48
Joachim Kerschbaumer4-May-08 22:48 
QuestionWindows Explorer Columns Pin
Calvin Streeting3-May-08 23:44
Calvin Streeting3-May-08 23:44 
AnswerRe: Windows Explorer Columns Pin
Dave Kreskowiak4-May-08 15:42
mveDave Kreskowiak4-May-08 15:42 
GeneralRe: Windows Explorer Columns Pin
Calvin Streeting6-May-08 12:46
Calvin Streeting6-May-08 12:46 
Questioncompile time error or runtime error? Pin
George_George3-May-08 23:42
George_George3-May-08 23:42 
AnswerRe: compile time error or runtime error? Pin
GuyThiebaut4-May-08 0:30
professionalGuyThiebaut4-May-08 0:30 
GeneralRe: compile time error or runtime error? Pin
Roger Alsing4-May-08 0:42
Roger Alsing4-May-08 0:42 
That is not the answer to his question.
that is just the reason why it gives a runtime exception.

the question was why there is no compiletime check.

And the short answer to that is that MS was too lazy to make the compiler check for those kinds of things.

All the information is right there in the code:

int i=1;
object o=i;
long l=(long)o;

So it should be perfectly possible to make compiler support to find the error.

Aand "lazy" might be the wrong word, the might just think that the developer should find such problems, that the complexity to implement it is greater than the benefit of the feature..


GeneralRe: compile time error or runtime error? Pin
George_George4-May-08 4:01
George_George4-May-08 4:01 
GeneralRe: compile time error or runtime error? PinPopular
Colin Angus Mackay4-May-08 4:35
Colin Angus Mackay4-May-08 4:35 
GeneralRe: compile time error or runtime error? Pin
George_George4-May-08 4:40
George_George4-May-08 4:40 
GeneralRe: compile time error or runtime error? Pin
Roger Alsing4-May-08 5:24
Roger Alsing4-May-08 5:24 
GeneralRe: compile time error or runtime error? Pin
George_George4-May-08 18:56
George_George4-May-08 18:56 
GeneralRe: compile time error or runtime error? [modified] Pin
Roger Alsing4-May-08 7:51
Roger Alsing4-May-08 7:51 
GeneralRe: compile time error or runtime error? Pin
George_George4-May-08 18:58
George_George4-May-08 18:58 
GeneralRe: compile time error or runtime error? Pin
George_George4-May-08 4:04
George_George4-May-08 4:04 
GeneralRe: compile time error or runtime error? Pin
Guffa4-May-08 14:19
Guffa4-May-08 14:19 
GeneralRe: compile time error or runtime error? Pin
George_George4-May-08 19:00
George_George4-May-08 19:00 
GeneralRe: compile time error or runtime error? Pin
Guffa4-May-08 23:25
Guffa4-May-08 23:25 
GeneralRe: compile time error or runtime error? Pin
George_George7-May-08 1:24
George_George7-May-08 1:24 
GeneralRe: compile time error or runtime error? Pin
Guffa7-May-08 6:44
Guffa7-May-08 6:44 
GeneralRe: compile time error or runtime error? Pin
George_George7-May-08 22:28
George_George7-May-08 22:28 
GeneralRe: compile time error or runtime error? Pin
Guffa8-May-08 12:59
Guffa8-May-08 12:59 
GeneralRe: compile time error or runtime error? Pin
George_George8-May-08 22:13
George_George8-May-08 22:13 
GeneralRe: compile time error or runtime error? Pin
Guffa9-May-08 1:26
Guffa9-May-08 1:26 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.