Tag

Your search for c-sharp returned 4 results.


Neat way to handle Nullable types …

Ever since I read Rick Strahl's blog post on the C# ?? operator, I've been in love with the C# ?? operator. Mostly I use it as a clean way to test a ViewState variable for null in a property. For example, protected string stringToPersistOnPostBack { get { return (ViewState[this.ClientID + "_stringToPersistOnPostBack"] ?? "").ToString();< ...

Read More


Random Annoying Crap about WPF Data Binding & Linq to SQL

For a new project at work, we are using WPF and Linq to Sql. In some ways data binding in WPF is very sexy and suave. In other ways, it's aggravating -- there are things that are so easily done in WinForms and ASP .Net, like, say, re-binding data to a control after it's changed, that are bitch to figure out in WPF. At least for me they are. In theory, WPF can ...

Read More


DBNull is my Nemisis: Part Deux

******This is the second part of my rant about DbNull. Go here to read the first part.******Ok. So now you have a utility method that lets you check for null whether it's null, DbNull, or, if bound to a datagrid, "&nbsp;"What if you want to Convert that object, which might be null or DbNull, to a Type? What if you'd like to write it in pretty code? Well then ...

Read More


DBNull is my Nemisis

Despite what I told interviewers when looking for a new job last summer, I definitely prefer C# over Java. Having learned to program mostly in C++ with all it's (dangerous) flexibility, the fact that Java did not implicitly convert primitives to their object counter-parts (i.e. double and Double) - not to mention the endlessly long names - filled me with endless ...

Read More