Safely Cast from bool? to bool
This is a little code snippet for when you need to cast a nullable type to its value type.
if (startPage.ShowMainFeatured.HasValue) { // Safe to cast if ((bool) startPage.ShowMainFeatured) { mainfeatured.Visible = true; } }