MT,
| Any idea
| why is that ?
The benefits (and also pitfalls) of JIT compiling.
Remember that VB.NET creates MSIL code. At run time the CLR converts your
MSIL code into executable code the first time you execute a routine.
Subsequent calls to that routine will be faster as the JIT itself has
already been complete.
NOTE: The JIT steps occurs each time you execute the program. You can use
NGEN to pre-JIT your assembly, however I understand that a JIT still
occurs...
--
Hope this helps
Jay B. Harlow [MVP - Outlook]
..NET Application Architect, Enthusiast, & Evangelist
T.S. Bradley -
http://www.tsbradley.net
"MT" <sa**********@mft.comwrote in message
news:%2****************@TK2MSFTNGP03.phx.gbl...
| Platform : VB.NET 2003
| I have code as below.
| Question: The 8 seconds only occured on the 1st time the code run. If I
| click the button again , the interval become smaller than 1 seconds. This
| sympton occured on multiple development PC that run the .NET 2003. Any
idea
| why is that ?
|
| * Code :
|
| Private Sub btnTiming_Click(ByVal sender As System.Object, ByVal e As
| System.EventArgs) Handles btnTiming.Click
| Dim blnResult As Boolean
|
| Debug.WriteLine("start time: " & Now())
| blnResult = IsDate("88/88/8888")
| Debug.WriteLine("end time: " & Now())
|
| End Sub
|
| * Output Result show:
| start time: 8/15/2006 5:32:14 PM
| end time: 8/15/2006 5:32:22 PM
|
|
|
|