C# 19 June 2020 The continued theft of ideas by C# Back in the good old days, C# was .NET was Windows. Sure there were antique languages like VB.NET and ivory tower academia from F#
C# 5 February 2019 Immutability One of biggest trends in the last few years is functional programming, once again proving that fashion goes in circles. Immutability is a central tenet
C# 11 April 2017 Verbatim strings and string interpolation There have always been a few different ways of dealing with strings of text in C#, depending on what we need we might use any
C# 4 August 2016 .NET Framework 4.6.2 released The .NET Framework has been updated to 4.6.2 (full announcement here [https://blogs.msdn.microsoft.com/dotnet/2016/08/02/announcing-net-framework-4-6-2] ) and it
C# 31 May 2016 Calling Async code from sync method Update: C#7.1 and .NET Core 2.0 both now support async Main methods! Async code is awesome, that's just science. But when you
C# 22 March 2016 Enums and the HasFlag method (or 'How "1 + 0 = 1" can Ruin Your Day') In .NET an enum is a type used to denote a complete set of simple constants. A simple example being the System.DayOfWeek [https://msdn.
.NET Core 2 October 2015 Install ASP.NET vNext on a DigitalOcean Ubuntu droplet Note This entry has been updated and republished to account for the breaking changes which have taken place in the vNext (now DNVM) project .NET
F# 11 October 2014 Functional Programming in F# Over the last year I have heard more and more about F#, a functional language for the .Net platform. A great resource for getting to
C# 28 September 2014 Parsing numbers in C based languages In some C based languages such as C++, Java or Javascript any leading zeros at the start of a number will cause that number to
C# 10 June 2014 Quick selection of random element in collection Wouldn't advise this one in production code but if during testing you need to pull a random element from a pool of known good values
C# 1 April 2014 Passing a DateTime parameter to an MVC Action If you need to pass a date to an MVC action method you should include it in a form and pass back the entire form
C# 5 February 2014 Validating file names for writing to disk Suppose you have a system where a user can upload a file and they can specify the name of the file, or where a file
C# 5 February 2014 Working with paths in C# Time and time again when working with code that involves operations with the file system a developer may write something like var path = @"C:\Temp"
C# 25 January 2014 Getting the name of a property as a string EDIT Everything below is completely unnecessary in C#6, just use the nameof operator So instead of using any of the shenanigans and hacks below,
C# 25 January 2014 Parsing strings to enums Not something that's needed very often but sometimes we can need to get an enum value from a string, perhaps a value returned from an