Article Categories
- All Categories
-
Data Structure
-
Networking
-
RDBMS
-
Operating System
-
Java
-
MS Excel
-
iOS
-
HTML
-
CSS
-
Android
-
Python
-
C Programming
-
C++
-
C#
-
MongoDB
-
MySQL
-
Javascript
-
PHP
Selected Reading
C# DateTime Max Value
To set the max value for a Date, use the DateTime property MaxValue.
DateTime max = DateTime.MaxValue;
Now, display the value of max to get the maximum value of a date as shown below.
Example
using System;
using System.Linq;
public class Demo {
public static void Main() {
DateTime max = DateTime.MaxValue;
Console.WriteLine(max);
}
}
Output
12/31/9999 11:59:59 PM
Advertisements
