468,785 Members | 1,672 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 468,785 developers. It's quick & easy.

expression "bool?"

Hi!

Example:

public bool? IsChecked
{
get { throw new NotImplementedException(); }
}

What does the question mark after the bool mean ("bool?")?
Sep 3 '08 #1
2 4232
nullable bool. It can return true, false, or null.

"Marcel Kloubert" wrote:
Hi!

Example:

public bool? IsChecked
{
get { throw new NotImplementedException(); }
}

What does the question mark after the bool mean ("bool?")?
Sep 3 '08 #2
It's a shortcut to Nullable<bool>. You can see more about Nullable
struct on MSDN.

Family Tree Mike wrote:
nullable bool. It can return true, false, or null.

"Marcel Kloubert" wrote:
>Hi!

Example:

public bool? IsChecked
{
get { throw new NotImplementedException(); }
}

What does the question mark after the bool mean ("bool?")?
--
Thanks,
Duy Lam
Sep 14 '08 #3

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

3 posts views Thread by Mochuelo | last post: by
4 posts views Thread by Frederick Gotham | last post: by
reply views Thread by zhoujie | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.