I have three dates
DateTime date1 = st.UpdatedDate;
DateTimed date2 = cl.updatedDate;
DateTime date3 = d.UpdatedDate;
I am comparing and finding latest date as following...
if (date1 > date2 && date1 > date3 )
latestDate = date1;
else if (date2 > date1 && date2 > date3 )
latestDate = date2 ;
else
latestDate = date3;
I wonder and would like to ask whether there is any built-in method that can compare multiple dates and tell me the greatest date?