ExtensionMethod.NET Home of 880 C#, Visual Basic, F# and Javascript extension methods

ToNull

Turns any object to null

Source

public static object ToNull(this object o)
{
return null;
}

Example

object o = new object();
o.ToNull();

Author: Francisca Garse

Submitted on: 16 nov. 2012

Language: C#

Type: System.Object

Views: 7392