converting dates things from visual basic to c-sharp

Posted by sinrtb on Programmers See other posts from Programmers or by sinrtb
Published on 2012-09-27T01:44:57Z Indexed on 2012/09/27 3:48 UTC
Read the original article Hit count: 315

So as an excercise in utility i've taken it upon myself to convert one of our poor old vb .net 1.1 apps to C# .net 4.0.

I used telerik code conversion for a starting point and ended up with ~150 errors (not too bad considering its over 20k of code and rarely can i get it to run without an error using the production source) many of which deal with time/date in vb versus c#.

my question is this how would you represent the following statement in VB

If oStruct.AH_DATE <> #1/1/1900# Then

in C#? The converter gave me

            if (oStruct.AH_DATE != 1/1/1900 12:00:00 AM) {

which is of course not correct but I cannot seem to work out how to make it correct.

© Programmers or respective owner

Related posts about c#

Related posts about .NET