when a method expect a DateTime, how can i pass it a null value?
Posted on 2009-02-20
i've created a method that can receive datetime in order to specify the query.
public DataTable getStats( bool dateArray, dateTime start, dateTime stop)
i'd like to call my method as follow:
- getStats(false, null, null); <- no array, i want all values.
- getStats(true, DateTime, DateTime); <- with array , i want to limit with dates.
now when i call my method with null, my compilation pass not,
what would be the right way to do it?
thanks in advance