System.ObjectExtentions.ToDateTime C# (CSharp) Méthode

ToDateTime() public static méthode

Convert an object into a DateTime
public static ToDateTime ( this foo ) : System.DateTime
foo this this
Résultat System.DateTime
        public static DateTime ToDateTime(this object foo)
        {
            if (foo.IsNull())
                return DateTime.MinValue;
            else
                return Convert.ToDateTime(foo);
        }