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

C#

 
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 
Here are some examples:
int -> long: compiles, can never fail at runtime
int -> object -> long: compiles (int->object is valid boxing instruction, object->long is valid unboxing instruction), but always fails at runtime because a box containing int cannot be unboxed to long
int -> object -> int -> long: compiles and works at runtime
int -> IComparable -> int: same as int -> object -> int
int -> string: fails with compile error, there's no conversion operator int->string (ToString is not a conversion operator), and there's no way this cast could succeed
int -> object -> string: compiles (int->object is valid boxing instruction, object->string is valid cast), but always fails at run time because a boxed int cannot be cast to string.
long -> int: compiles, but might fail at runtime when the long is too large and integer overflow checking is enabled
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 
GeneralRe: compile time error or runtime error? Pin
George_George7-May-08 1:29
George_George7-May-08 1:29 
AnswerRe: compile time error or runtime error? Pin
Charith Jayasundara4-May-08 8:04
Charith Jayasundara4-May-08 8:04 
GeneralRe: compile time error or runtime error? Pin
George_George4-May-08 18:46
George_George4-May-08 18:46 
QuestionNumbers Don't Display According To The Current Culture! Pin
WaleedH3-May-08 23:21
WaleedH3-May-08 23:21 
QuestionDateTime Hour Minute Question Pin
MumbleB3-May-08 22:38
MumbleB3-May-08 22:38 
AnswerRe: DateTime Hour Minute Question Pin
MumbleB3-May-08 22:42
MumbleB3-May-08 22:42 
GeneralRe: DateTime Hour Minute Question Pin
Luc Pattyn3-May-08 23:07
sitebuilderLuc Pattyn3-May-08 23:07 
GeneralRe: DateTime Hour Minute Question Pin
MumbleB3-May-08 23:45
MumbleB3-May-08 23:45 
GeneralRe: DateTime Hour Minute Question [modified] Pin
#realJSOP4-May-08 3:53
mve#realJSOP4-May-08 3:53 
GeneralRe: DateTime Hour Minute Question Pin
PIEBALDconsult4-May-08 5:55
mvePIEBALDconsult4-May-08 5:55 
GeneralRe: DateTime Hour Minute Question Pin
Luc Pattyn4-May-08 11:40
sitebuilderLuc Pattyn4-May-08 11:40 
QuestionCPU and RAM Usage Pin
Ian Uy3-May-08 19:44
Ian Uy3-May-08 19:44 

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.