Get The Unix Epoch Time In One Line Of C#
One line of C#, so much awesomeness: The Unix epoch time.
int epoch = (int)(DateTime.UtcNow - new DateTime(1970, 1, 1)).TotalSeconds;
Coding best practices
C# (programming language)
Opinions expressed by DZone contributors are their own.