Q:

DateSerial in VBScript and .net

In VBScript I have code:
someLongValue = CLng(DateSerial(2011, 11, 1))

and in that case someLongValue equals to 40848. 
How can I do same cast in C#? 
Thanks!  

A:

DateTime. ToOADate() should return what you're looking for:
int oleValue = (int)new DateTime(2011, 11, 1).ToOADate();

