fx-sharp  0.1
A collection of functional extensions for C#.
 All Classes Namespaces Files Functions Variables Enumerator
Ensure.cs
Go to the documentation of this file.
1 using System;
2 
3 namespace FxSharp.Utils
4 {
5  internal class Ensure
6  {
7  public static void NotNull<T>(T o, string source)
8  {
9  // ReSharper disable once CompareNonConstrainedGenericWithNull
10  if (typeof (T).IsClass && o == null)
11  {
12  throw new ArgumentNullException(source);
13  }
14  }
15  }
16 }