ext_70068 ([identity profile] joxn.livejournal.com) wrote in [personal profile] dtm 2011-06-14 06:16 pm (UTC)

In C#, you can't assign something that could be null to a ref bool because bool is a value type and therefore not nullable.

C# has a syntax which allows you to specify that a variable might be a value type or null: bool? test = null. You can't use a bool? in a bool context without casting, though, and it will throw at runtime if you try to do the cast on something that is null.

Post a comment in response:

This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting