Later Today: ASP.NET Tutorial 2: Introduction to C#

(C#) Sending an Email (Plain-Text & HTML)

This article covers the various methods of sending an email using C#, either in plain text or HTML.

Continue Reading this Article >>

(C#) Null Coalescing Operator (setting default variable values)

The purpose of the Null Coalescing Operator ( ?? ) is to set a default value for a variable in the event the first value you are attempting to assign from is null. Hence, the logic behind the null coalescing operator is this: If this variable is null, use this other value instead.

This is handy is because what would otherwise be a multiple-line if/else block is now a single, concise line.

Continue Reading this Article >>

(C#) DateTimes: Finding the last day of a month

Since we know that all months have at least one day, setting an existing DateTime to the first day of a month is a cinch… but finding the last day of a month is a wee bit more complicated since months tend to have a variable number of days from year to year.

Fortunately, there is a relatively simple (if roundabout) way to calculate the last day in a month.

Continue Reading this Article >>
RSS Twitter LinkedIn Facebook
Doing neato things with JavaScript, please wait...