Re: .NET 2.0 DateTime conversion error??



Hi Otis,

I pasted the code you gave me into a console application, ran it and got the
exact same error. It would seem to make sense that it is not in the datetime
convert function, however what array is it talking about?

The error seems to originate from mscorlib.dll. Does that make any sense? I
have a clean install of XP pro with .NET 2.0 on it. I had this problem on my
other machine and I orginally thought it was because I had .NET 1.1 and .NET
2.0 on the same machine.

I have done this datetime conversion function many times with .NET 1.1, so
that is why I am so baffled.

Tim

"Otis Mukinfus" <phony@xxxxxxxxxxxxxxxx> wrote in message
news:ocjtt1hkc52o47huioh2v8paontn6blv8e@xxxxxxxxxx
> On Mon, 30 Jan 2006 20:26:43 -0500, "Tim" <timcowan@xxxxxxxxxxxx>
> wrote:
>
>>Hi Otis,
>>
>>Thanks for the reply, however this also fails on my system.
>>
>>DateTime.Parse("01/01/2006")
>>'DateTime.Parse("01/01/2006")' threw an exception of type
>>'System.IndexOutOfRangeException'
>>base {System.SystemException}: {"Index was outside the bounds of the
>>array."}
>>
>>That damn array just won't go away! Any more ideas?
>>
>>Tim
> [snip]
>
> Gosh, Tim! I think something else is wrong. Have you stepped through
> the code with the debugger (I mean ALL the lines before the method
> calls)? It ain't happening in the code I sent you.
>
> Paste the code below into a NEW console application, replacing all of
> the default code and see what happens:
>
> using System;
> using System.Collections.Generic;
> using System.Text;
> using System.Data;
>
> namespace TestConsole
> {
> class Program
> {
> static void Main(string[] args)
> {
> DateTime dt = DateTime.Parse("01/01/2006");
> DateTime dte = DateTime.Parse("Jan 30, 2006");
> }
> }
> }
>
> Otis Mukinfus
> http://www.otismukinfus.com
> http://www.tomchilders.com


.



Relevant Pages

  • Re: .NET 2.0 DateTime conversion error??
    ... Try/catch the exception and write it to the console an post here. ... "Tim" wrote in message ... however what array is it talking about? ... | "Otis Mukinfus" wrote in message ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: druckerkonzept
    ... Hallo Tim, ... oder direkt über die Presentation Server Console (Printserver ... alle treiber einmalig per point & print als Admin verbinden und wieder ... Next by Date: ...
    (microsoft.public.de.german.win2000.termserv.apps)
  • Re: root loggin in to console without network?
    ... Tim writes: ... even root on console is not able to log in to the ... > Are you using the CDE login manager? ... Not that I am aware of and besides, the console in question is some IBM3153 ...
    (comp.unix.admin)
  • Re: root loggin in to console without network?
    ... Tim writes: ... even root on console is not able to log in to the ... > Are you using the CDE login manager? ... Not that I am aware of and besides, the console in question is some IBM3153 ...
    (comp.unix.aix)
  • Re: Change volume serial number
    ... Tim, can you tell me how does volumeID works at you please? ... console returns me the "Access denied!" ... floppy discs as well as fixed discs. ...
    (microsoft.public.windowsxp.general)

Loading