Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
Working nullable DateTime C#
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { // conversion of https://rextester.com/edit/DARXC69153 to c# foreach (var b in new[] {true, false}) { var d = !b ? DateTime.Today : (DateTime?)null; Console.WriteLine("Parameter b: " + b); Console.WriteLine("Result is Nothing: " + (!d.HasValue).ToString() + " '" + d.ToString() + "'"); } } } }
run
|
edit
|
history
|
help
1
Please
log in
to post a comment.
DateTime
Reverse String
blanaced parenthes
unsorted array which has a number in the majority (a number appears more than 50% in the array
Captcha
DNA Programmer
lambda funcs C#
Number to string
Understandiing Virtual, Override, New Keyword in C#
ParseIpRanges invalid character in string
Please log in to post a comment.