is it a ListView BUG ?

  • Thread starter Thread starter xucheng
  • Start date Start date
X

xucheng

It raise MissingMethodException when i debug my app .The error line is
following code , lvResult is ListView control :
lvResult.Items.Clear();

then I suppose this Error should be raise by some API call , I change my
code to :

private void lvResult_SelectedIndexChanged(object sender, System.EventArgs
e) {
.......
try {
Core.ShellExecute("\\windows\\pword.exe",FileName); }
catch {
}
.......
}

But it still can not catch this Exception .
At the end , I remove the code
Core.ShellExecute("\\windows\\pword.exe",FileName); , code
lvResult.Items.Clear(); work .

In despite of why Core.ShellExecute raise Exception now , the important
thing is why this Exception should raise on API call , but it raise on
lcode vResult.Items.Clear();
 
Hello Xucheng,

It sounds like the debugger is placing the "current statement" indicator on
the statement previous to the one that causes the MissingMethodException.
This is probably because when the CLR can't find the correct method to
invoke, the debugger's pointer to the current statement does not get
updated. As you've verified, the exception doesn't occur after removing
the call to the "Core.ShellExecute" method, so you're correct that it is
not the ListView's Items.Clear method that is causing the exception.

Thanks,
--Joe



--------------------
| From: "xucheng" <[email protected]>
| Subject: is it a ListView BUG ?
| Date: Thu, 25 Sep 2003 11:17:06 +0800
| Lines: 32
| X-Priority: 3
| X-MSMail-Priority: Normal
| X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
| X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
| Message-ID: <[email protected]>
| Newsgroups: microsoft.public.dotnet.framework.compactframework
| NNTP-Posting-Host: 203.126.19.234
| Path: cpmsftngxa06.phx.gbl!TK2MSFTNGP08.phx.gbl!TK2MSFTNGP09.phx.gbl
| Xref: cpmsftngxa06.phx.gbl
microsoft.public.dotnet.framework.compactframework:34368
| X-Tomcat-NG: microsoft.public.dotnet.framework.compactframework
|
|
| It raise MissingMethodException when i debug my app .The error line is
| following code , lvResult is ListView control :
| lvResult.Items.Clear();
|
| then I suppose this Error should be raise by some API call , I change my
| code to :
|
| private void lvResult_SelectedIndexChanged(object sender, System.EventArgs
| e) {
| ......
| try {
| Core.ShellExecute("\\windows\\pword.exe",FileName); }
| catch {
| }
| ......
| }
|
| But it still can not catch this Exception .
| At the end , I remove the code
| Core.ShellExecute("\\windows\\pword.exe",FileName); , code
| lvResult.Items.Clear(); work .
|
| In despite of why Core.ShellExecute raise Exception now , the important
| thing is why this Exception should raise on API call , but it raise on
| lcode vResult.Items.Clear();
|
|
|
|
|
|
|
 
Back
Top