Run Code
|
API
|
Code Wall
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
DateTime
//Rextester.Program.Main is the entry point for your code. Don't change it. //Microsoft (R) Visual C# Compiler version 2.9.0.63208 (958f2354) using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { DateTime mydata =DateTime.Now; //Your code goes here Console.WriteLine(mydata); Console.WriteLine(mydata.ToShortDateString()); Console.WriteLine(mydata.ToShortTimeString()); Console.WriteLine(mydata.ToLongDateString()); Console.WriteLine(mydata.ToLongTimeString()); Console.WriteLine(mydata.AddMonths(4).ToShortDateString()); DateTime test =DateTime.Parse("2021/09/01"); TimeSpan timemoves = DateTime.Now.Subtract(test); Console.WriteLine(timemoves.TotalDays); } } }
run
|
edit
|
history
|
help
0
Encapsulation and abstration
dsadsadsa
test device logger
summing a set
check ca a place
Symantic check for object type variables
C# goes Javascriptish (or Pythonish)
Store reference to a object
hacker
inheritance with virtual orride