GetDate
public static class ExtensionMethod { public static DateTime GetCurrentDate(this object source) { return DateTime.Now; } }Example:
object anything = new object(); DateTime date = anything.GetCurrentDate();
Description
Return the current date and time
Details
- Author: Thor Jack
- Submitted on: 3/25/2015 11:03:18 AM
- Language: C#
- Type: System.DateTime
- Views: 2012
Double click on the code to select all.