Exemplo n.º 1
0
 public void Add(OldThing thing)
 {
     if (thing != null)
     {
         throw new ArgumentNullException("thing");
     }
 }
Exemplo n.º 2
0
 public void Add(OldThing thing)
 {
     if (thing != null)
     {
         throw new ArgumentNullException(nameof(thing));                                             //In C# 6.0 you can use nameof method to make future refactoring easier
     }
 }