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

C#

 
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 
You are right, what my code example shows is not boxing. It demonstrates that you can cast a reference stored in an object reference variable to the actual type or one of it's base types.

For boxing, you can only unbox to the actual type that was boxed. A value type can not inherit another value type, so there is never any base type that you could unbox to instead.

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

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 
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 
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 

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.