On Tue, 25 Aug 2009 05:51:24 -0700, Roman
<(E-Mail Removed)> wrote:
> Hi,
>
> We use a function to get the current decimal separator from a
> WindowsServer:
>
> CultureInfo.CurrentCulture.NumberFormat.NumberDecimalSeparator[0]
>
> This was running fine for many Years. In the last few months something
> happend and this function starts to throw exceptions: Index was
> outside the bounds of the array
>
> The function is used from a Windows Service running under the local
> system account. The regional settings are ok and it is working when I
> call as a user (local admin)
>
> What's going wrong here?
Assuming you are correct about exactly where the error is occurring, it
sounds like you have a culture with a NumberFormat property that has no
elements in the NumberDecimalSeparator collection.
Without a concise-but-complete code example that reliably reproduces the
problem, it would be very difficult to anticipate _why_ that might be. It
could be that things are not as "ok" as you think they are with your
OS/.NET installation.
Pete
|