-
Greetings! I am Torleif Berger, 24 years old, a Seventh-Day Adventist and currently working as a software developer. Otherwise, not much to tell. Although I do juggle a bit...
-
Async Best practices Big Int Blogging Books C# Collatz conjecture Command line Embedded Resources Events Factorization Fibonacci Genders Hashing Java Latex Mac Math Media Men MySql Nerd Null NUnit Palindromes Plugins Primes Pythagorean triplets Python Sieve of Atkin Sieve of Eratosthenes Snippet Sorting Sql Subversion TDD Threading Tools Triangle Numbers Tutorial Unit-Testing Unix WinForms WordPress YouTube
WP Cumulus Flash tag cloud by Roy Tanck and Luke Morton requires Flash Player 9 or better.
Tag Archives: Snippet
Generics and checking for null
When writing C#, in Visual Studio, using generics… have you ever tried checking for null? I have always found that a bit of a hassle.
Say we have this method which returns the subject if it is not null, and the result of a createNew() function if it is null.
public static T NewIfNull<t>(this T subject, [...]


















How to check for duplicates