Safely Cast from bool? to bool
Posted on May 4, 2009 by Frederik Vig in C#, Code SnippetThis 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; } }

Bearings says:
Post Author October 26, 2010 at 23:34Strange, your post shows up with a dark hue to it, what color is the main color on your site?