The Author Online Book Forums are Moving

The Author Online Book Forums will soon redirect to Manning's liveBook and liveVideo. All book forum content will migrate to liveBook's discussion forum and all video forum content will migrate to liveVideo. Log in to liveBook or liveVideo with your Manning credentials to join the discussion!

Thank you for your engagement in the AoF over the years! We look forward to offering you a more enhanced forum experience.

import-bot (20211) [Avatar] Offline
#1
[Originally posted by process]

In page 19, after declaring a variable s as string, you wrote: "... s, in this
example, can refer to null, or to a string, or to its base class
System.Object."

That is not correct, s can only refer to null or to a string, trying to change
s to refer to a System.Object() instance will produce a compile error (or a
runtime error if casting is used)

Sam
import-bot (20211) [Avatar] Offline
#2
Re: string = object is not allowed
[Originally posted by fgrimes]

Hi Sam,
Yes, you're right... that's an error. I meant that an object type can
reference a string.
Thanks,
Fergal