Re: ArgumentOutofRangeException in ListView

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance

From: Brian Cobb (BrianCobb_at_discussions.microsoft.com)
Date: 10/13/04


Date: Wed, 13 Oct 2004 06:25:04 -0700

No prob on the vb code. It was easy enough to get working.

What exactly do you mean by "put a break point the Remove statement
and debug it step by step to see where exactly the exception is being
thrown."? Before posting I tried setting a break point on remove and then
doing a "Step Into". The problem is the next "step" I'm taken to is always
the closing brace in Main(). Being a relatively new user of VS .Net, perhaps
I've missed some other way to to trace the code that would provide more
information?

"Imran Koradia" wrote:

> > With a little reworking of the code, I was able to get this to compile;
> I guess you figured I'm VB'er - I gave my best shot at getting the syntax
> right for C# but looks like I still messed up ;-)
>
> > however; I'm still getting the same exception at the same place.
>
> I'm not sure why you would still get the error. I used the same code and its
> working fine. To make sure, I even created a new C# project and tried out
> the code you posted with a simple listview. That worked fine too. I also
> tried various views - Details, LargeIcon, etc etc.. For all of them, the
> piece of code worked fine. I believe its something else thats causing the
> exception to be thrown. I suggest you put a break point the Remove statement
> and debug it step by step to see where exactly the exception is being
> thrown. That seems to be the only way you can figure out what's going wrong.
>
> hope that helps..
> Imran.
>
>
>



Relevant Pages

  • Re: System.ExecutionEngineException for certificate object creation
    ... The classic way to debug this would be to use a lower level debugger like ... see if they have any suggestions as a lot of the more hard core CLR guys ... > this specific call to object creation that is throwing the exception. ... > If I comment it out, no exception is thrown. ...
    (microsoft.public.dotnet.security)
  • Re: How to debug this?
    ... >> When you compile a program in 'debug' configuration these 'symbols' are ... >> allow for richer information to be displayed when an exception occurs. ... >> is thrown ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Object lifetime question... again
    ... In my opinion the first is more readable. ... The first is easier to debug, ... especially if an exception is thrown. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: ArgumentOutofRangeException in ListView
    ... When the exception is caught and it breaks on the ... > the closing brace in Main. ... >> exception to be thrown. ... >> and debug it step by step to see where exactly the exception is being ...
    (microsoft.public.dotnet.framework.windowsforms.controls)
  • Re: Video hangs while its running under Windows CE
    ... exception when you are running a DEBUG OS with that debugger. ... I'm sorry Mr. Paul, you mistaken me. ... Exception in device.exe, gwes.exe & filesys.exe. ... DEBUG build and try to get the kernel debugger to show you where the ...
    (microsoft.public.windowsce.embedded)