Click here to Skip to main content
15,916,371 members
Home / Discussions / C#
   

C#

 
GeneralRe: C# to excel Pin
prithaa31-May-10 0:26
prithaa31-May-10 0:26 
QuestionThe WebRequest class is abstract, so how are we able to instantiate an object from it? Pin
Jeff Kissinger30-May-10 11:10
Jeff Kissinger30-May-10 11:10 
AnswerRe: The WebRequest class is abstract, so how are we able to instantiate an object from it? Pin
Dave Kreskowiak30-May-10 11:50
mveDave Kreskowiak30-May-10 11:50 
AnswerRe: The WebRequest class is abstract, so how are we able to instantiate an object from it? Pin
PIEBALDconsult30-May-10 17:34
mvePIEBALDconsult30-May-10 17:34 
AnswerRe: The WebRequest class is abstract, so how are we able to instantiate an object from it? Pin
Jeff Kissinger31-May-10 10:05
Jeff Kissinger31-May-10 10:05 
QuestionBlocking vs. Non-Blocking Socket efficiency? Pin
Hamed Musavi30-May-10 7:40
Hamed Musavi30-May-10 7:40 
AnswerRe: Blocking vs. Non-Blocking Socket efficiency? Pin
PIEBALDconsult30-May-10 8:12
mvePIEBALDconsult30-May-10 8:12 
GeneralRe: Blocking vs. Non-Blocking Socket efficiency? Pin
Hamed Musavi30-May-10 8:17
Hamed Musavi30-May-10 8:17 
GeneralRe: Blocking vs. Non-Blocking Socket efficiency? Pin
PIEBALDconsult30-May-10 16:19
mvePIEBALDconsult30-May-10 16:19 
GeneralRe: Blocking vs. Non-Blocking Socket efficiency? Pin
Hamed Musavi30-May-10 8:53
Hamed Musavi30-May-10 8:53 
AnswerRe: Blocking vs. Non-Blocking Socket efficiency? Pin
harold aptroot30-May-10 9:00
harold aptroot30-May-10 9:00 
GeneralRe: Blocking vs. Non-Blocking Socket efficiency? Pin
Hamed Musavi30-May-10 9:02
Hamed Musavi30-May-10 9:02 
GeneralRe: Blocking vs. Non-Blocking Socket efficiency? Pin
harold aptroot30-May-10 9:13
harold aptroot30-May-10 9:13 
GeneralRe: Blocking vs. Non-Blocking Socket efficiency? Pin
harold aptroot30-May-10 9:26
harold aptroot30-May-10 9:26 
GeneralRe: Blocking vs. Non-Blocking Socket efficiency? Pin
Hamed Musavi30-May-10 9:28
Hamed Musavi30-May-10 9:28 
AnswerRe: Blocking vs. Non-Blocking Socket efficiency? Pin
Luc Pattyn30-May-10 10:23
sitebuilderLuc Pattyn30-May-10 10:23 
GeneralRe: Blocking vs. Non-Blocking Socket efficiency? Pin
Hamed Musavi30-May-10 18:25
Hamed Musavi30-May-10 18:25 
GeneralRe: Blocking vs. Non-Blocking Socket efficiency? Pin
Luc Pattyn31-May-10 1:48
sitebuilderLuc Pattyn31-May-10 1:48 
QuestionUnix Time Pin
jojoba201130-May-10 7:39
jojoba201130-May-10 7:39 
AnswerRe: Unix Time Pin
PIEBALDconsult30-May-10 8:34
mvePIEBALDconsult30-May-10 8:34 
AnswerRe: Unix Time Pin
Kristian Sixhøj30-May-10 9:09
Kristian Sixhøj30-May-10 9:09 
QuestionRe: Unix Time Pin
jojoba201130-May-10 21:07
jojoba201130-May-10 21:07 
AnswerRe: Unix Time Pin
Kristian Sixhøj31-May-10 2:34
Kristian Sixhøj31-May-10 2:34 
GeneralRe: Unix Time Pin
Daniel Grunwald31-May-10 8:14
Daniel Grunwald31-May-10 8:14 
That'll work on English systems only (or systems set to accept dates in English format).
The string format of dates is culture-specific, so Convert.ToDateTime will fail with that hard-coded date on non-English systems.
Use DateTime.Parse("1/1/1970 12:00:00 AM", CultureInfo.GetCultureInfo("en-US")), or simply new DateTime(1970, 1, 1).

Edit: Oh, and the site you linked to used UtcNow, you're using Now. Unix dates are the seconds since 1st January 1970 GMT, so your code produces incorrect results almost everywhere in the world (even in the UK, it's only correct during winter time).
AnswerRe: Unix Time Pin
PIEBALDconsult31-May-10 5:25
mvePIEBALDconsult31-May-10 5:25 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.