Click here to Skip to main content
15,887,135 members
Home / Discussions / C#
   

C#

 
GeneralRe: compile time error or runtime error? Pin
George_George10-May-08 22:00
George_George10-May-08 22:00 
GeneralRe: compile time error or runtime error? Pin
Guffa12-May-08 4:16
Guffa12-May-08 4:16 
GeneralRe: compile time error or runtime error? Pin
George_George13-May-08 3:35
George_George13-May-08 3:35 
GeneralRe: compile time error or runtime error? Pin
Guffa14-May-08 5:46
Guffa14-May-08 5:46 
GeneralRe: compile time error or runtime error? Pin
George_George14-May-08 16:07
George_George14-May-08 16:07 
AnswerRe: compile time error or runtime error? Pin
#realJSOP4-May-08 4:07
mve#realJSOP4-May-08 4:07 
GeneralRe: compile time error or runtime error? Pin
George_George4-May-08 4:37
George_George4-May-08 4:37 
GeneralRe: compile time error or runtime error? Pin
Guffa4-May-08 7:32
Guffa4-May-08 7:32 
John Simmons / outlaw programmer wrote:
What you should have done was:

int i = 100;
object b = (object)i;
long l = (long)b;


No, that's not what he should have done. That doesn't differ anything at all from the original code. All you have done is to replace the implicit cast to object with an explicit cast, which produces exactly the same code as before.

This is what he should have done:

int i = 100;
object b = i;
long l = (int)b;


Despite everything, the person most likely to be fooling you next is yourself.

GeneralRe: compile time error or runtime error? Pin
#realJSOP4-May-08 9:41
mve#realJSOP4-May-08 9:41 
GeneralRe: compile time error or runtime error? Pin
Guffa4-May-08 14:12
Guffa4-May-08 14:12 
GeneralRe: compile time error or runtime error? Pin
#realJSOP5-May-08 2:49
mve#realJSOP5-May-08 2:49 
GeneralRe: compile time error or runtime error? Pin
Guffa5-May-08 10:30
Guffa5-May-08 10:30 
GeneralRe: compile time error or runtime error? Pin
George_George4-May-08 18:55
George_George4-May-08 18:55 
GeneralRe: compile time error or runtime error? Pin
Guffa4-May-08 23:28
Guffa4-May-08 23:28 
GeneralRe: compile time error or runtime error? Pin
George_George7-May-08 1:27
George_George7-May-08 1:27 
AnswerRe: compile time error or runtime error? Pin
Daniel Grunwald4-May-08 4:31
Daniel Grunwald4-May-08 4:31 
GeneralRe: compile time error or runtime error? Pin
George_George4-May-08 4:36
George_George4-May-08 4:36 
GeneralRe: compile time error or runtime error? Pin
Daniel Grunwald4-May-08 4:56
Daniel Grunwald4-May-08 4:56 
GeneralRe: compile time error or runtime error? Pin
George_George4-May-08 18:33
George_George4-May-08 18:33 
GeneralRe: compile time error or runtime error? Examples Pin
Daniel Grunwald4-May-08 5:03
Daniel Grunwald4-May-08 5:03 
GeneralRe: compile time error or runtime error? Examples Pin
George_George4-May-08 18:38
George_George4-May-08 18:38 
GeneralRe: compile time error or runtime error? Pin
#realJSOP4-May-08 6:40
mve#realJSOP4-May-08 6:40 
GeneralRe: compile time error or runtime error? Pin
George_George4-May-08 18:41
George_George4-May-08 18:41 
GeneralRe: compile time error or runtime error? Pin
#realJSOP5-May-08 2:47
mve#realJSOP5-May-08 2:47 
GeneralRe: compile time error or runtime error? Pin
Guffa5-May-08 10:33
Guffa5-May-08 10:33 

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.