Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
devwiki:cs [2022/05/02 09:08] – [My App - Output Selected Item in Top Most Explorer in CSharp] ying | devwiki:cs [2022/05/07 06:53] (current) – [C# Basic] ying | ||
---|---|---|---|
Line 65: | Line 65: | ||
// c# has Stack object for Push() and Pop() | // c# has Stack object for Push() and Pop() | ||
// c# extra: SortedSet, HashSet | // c# extra: SortedSet, HashSet | ||
+ | </ | ||
+ | |||
+ | * timestamp to datetime conversion <code csharp> | ||
+ | using System; | ||
+ | public DateTime UnixTimeStampToDateTime(double unixTimeStamp) | ||
+ | { | ||
+ | // Unix timestamp is seconds past epoch | ||
+ | DateTime dateTime = new DateTime(1970, | ||
+ | dateTime = dateTime.AddSeconds(unixTimeStamp).ToLocalTime(); | ||
+ | return dateTime; | ||
+ | } | ||
</ | </ | ||
====== C# and Visual Studio Community edition ====== | ====== C# and Visual Studio Community edition ====== |