Ask a Question related to ASP.NET General, Design and Development.
- Andreas Klemt #1
Difference? myDate.Equals(Date.MinValue) -or- myDate = Date.MinValue Hello,
what is the difference and what is better (performance etc) ?
a) If myDate.Equals(Date.MinValue)
b) If myDate = Date.MinValue
Thanks,
Andreas
Andreas Klemt Guest
-
JSObject returns wrong date. How can Iextract correct date from digital signature?
I'm trying to extract name and date from digital signatures by using JSObject in Excel VBA, but JSObject returns wrong date. Year, month, hour and... -
#39245 [NEW]: date function generate wrong date with 1162083600 timestamp
From: lohner at aldea dot hu Operating system: Linux PHP version: 5.1.6 PHP Bug Type: Date/time related Bug description: ... -
how to display empty when the date is MinValue in datagrid
In the Datagrid clolumns there is one is DateTime Type. It always shows DateTime.MinValue. How can It show emptty string instead? I Know I can do... -
Convert date/time to date in SQL Server 2000 statement
Can this be done? tia -
How do I manipulate a date variable to a specific date array?
Hi, I use the getdate() function to return today's date in an array. I do this as I need to separate the day/month/year as to display them in a... - Jerry III #2
Re: Difference? myDate.Equals(Date.MinValue) -or- myDate = Date.MinValue Don't know about VB but in C# the operator calls the function. Depending on
the compiler the function might be faster (but most likely it will be the
same as the compiler will do the substitution, much like inline functions in
C++).
Jerry
"Andreas Klemt" <[email protected]> wrote in message
news:%[email protected]..> Hello,
> what is the difference and what is better (performance etc) ?
>
> a) If myDate.Equals(Date.MinValue)
> b) If myDate = Date.MinValue
>
> Thanks,
> Andreas
>
>
Jerry III Guest
- Andreas Klemt #3
Re: Difference? myDate.Equals(Date.MinValue) -or- myDate = Date.MinValue Hello,
results are:
a) If myDate.Equals(Date.MinValue)
0,007439
b) If myDate = Date.MinValue
0,002253
Regards,
Andreas
"MS News (MS ILM)" <[email protected]> schrieb im Newsbeitrag
news:[email protected]..> Time stamp it
> Run a loop 1000000000 times and see which one is better
> Please let us know
>
>
> "Andreas Klemt" <[email protected]> wrote in message
> news:%[email protected]..>> > Hello,
> > what is the difference and what is better (performance etc) ?
> >
> > a) If myDate.Equals(Date.MinValue)
> > b) If myDate = Date.MinValue
> >
> > Thanks,
> > Andreas
> >
> >
>
Andreas Klemt Guest
- Natty Gur #4
Re: Difference? myDate.Equals(Date.MinValue) -or- myDate = Date.MinValue Take a look in IL and you will see that CLR use Boxing just for Equals.
Equals should be slower.
//000004: Dim myDate As Date
//000005: If myDate.Equals(Date.MinValue) Then
IL_0001: ldloca.s myDate
IL_0003: ldsfld valuetype [mscorlib]System.DateTime
[mscorlib]System.DateTime::MinValue
IL_0008: box [mscorlib]System.DateTime
IL_000d: call instance bool
[mscorlib]System.DateTime::Equals(object)
IL_0012: brfalse.s IL_0014
//000006:
//000007: End If
IL_0014: nop
//000008: If myDate = Date.MinValue Then
IL_0015: ldloc.0
IL_0016: ldsfld valuetype [mscorlib]System.DateTime
[mscorlib]System.DateTime::MinValue
IL_001b: call int32
[mscorlib]System.DateTime::Compare(valuetype [mscorlib]System.DateTime,
valuetype [mscorlib]System.DateTime)
IL_0020: ldc.i4.0
IL_0021: bne.un.s IL_0023
//000009:
//000010: End If
Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Natty Gur Guest
- Natty Gur #5
Re: Difference? myDate.Equals(Date.MinValue) -or- myDate = Date.MinValue Hi,
run ILdasm.exe, open your assembly and look for your method. befor open
it enable show source lines from view menu.
Natty Gur, CTO
Dao2Com Ltd.
34th Elkalay st. Raanana
Israel , 43000
Phone Numbers:
Office: +972-(0)9-7740261
Fax: +972-(0)9-7740261
Mobile: +972-(0)58-888377
*** Sent via Developersdex [url]http://www.developersdex.com[/url] ***
Don't just participate in USENET...get rewarded for it!
Natty Gur Guest




