dotgnu-pnet
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: [Pnet-developers] System.Security.VerificationException


From: Tom Connolly
Subject: RE: [Pnet-developers] System.Security.VerificationException
Date: Tue, 8 Feb 2005 16:15:56 -0700

Colin JN Breame wrote:
> Hello,
> 
> After compiling and then running the attached file, an exception is
> thrown: 
> 
> $ cscc cogmod.cs && ilrun a.out
> cogmod::Main [20D2] - call at verify_call.c:1833
> Uncaught exception: System.Security.VerificationException: Could not
> verify the code
> 
> It seems that changing line 18:
> 
> for (int i=0; i<res.Length; i++) {
> 
> to:
> 
> for (int i=0; i<10; i++) {
> 
> Makes the problem go away.
> 
> Any ideas what's going on here?
> 
> Thanks
> 
>  -- Colin JN Breame

Colin,
Res.Length will give you the total number of elements in all dimentions
of the array.  Try Res.GetLength(0).  I think that's what your looking
for.  I am surprised that you didn't get a
System.IndexOutOfRangeException though.

Regards,
Tom



reply via email to

[Prev in Thread] Current Thread [Next in Thread]