I'm not sure you can get a UNIX date in .NET, but you have DateTime.Now as the equivalent new Date () (or new DateTime ())
As you got in the comment, you can get a TimeSpan object by sacrificing something in the lines ...
(First answer)
DateTime.Now.Subtract(new DateTime(1970,1,1)).TotalMilliseconds
Adding the final result for the sake of humanity ...
var d = DateTime.Now.Subtract(new DateTime(1970,1,1).ToUniversalTime()).TotalMilliseconds + " milliseconds since 1970/01/01";
PS Where is John Skeet with his knowledge of the time when we need him: P
cyberzed
source share