Home » Category » Web Forms

Web Forms: Child form __gc Array

100| Mon, 24 Dec 2007 15:46:00 GMT| nurbynerd| Comments (6)
Hi,

I have a VC++ .Net 2003 MDI application.

I am declaring a __gc Array in the frmChild_load method of the child form. The declaration is as follows

Double zData __gc[,] = new Double __gc[10,10];

It compiles and links properly but I get the following run-time error!!!!!

Error: Method not found: Void System.Array. (System.EventHandler)

The same declaration of array in the Parent form load method does not give any error

Please let me know if i am missing something ar the array has to be initialized in some other way

TIA

Suneet

Keywords & Tags: child, form, __gc, array, web, forms

URL: http://dotnet.itags.org/web-forms/136120/
 
«« Prev - Next »» 6 helpful answers below.
Anybody?

The 2dimensional __gc array doesnt seem to be working in any child forms

nurbynerd | Fri, 31 Aug 2007 14:46:00 GMT |

The error message doesn't look like a method at all. Can you double-check the exact wording of the message please?

nobugz | Fri, 31 Aug 2007 14:48:00 GMT |

Hi,

These were the exact words I got on the error message. I have uploaded the screenshot of the error at this link

http://grove.ufl.edu/~suneetl/CPP%20Program/Error.jpg

and for reference, I have uploaded the sample project at following location

http://grove.ufl.edu/~suneetl/CPP%20Program/ZTest.zip

--

Please let me know if there is something that I am missing.

The error disappears when I comment out the array declaration line

TIA

Suneet

nurbynerd | Fri, 31 Aug 2007 14:48:00 GMT |

I

poked at your code for a while, using VS2003, SP1. There's

something really strange going on. I isolated the statement in a

test() function. The first thing that was weird is that I

couldn't get a disassembly for the function in the IDE. Next, I

looked at the IL:

.method private instance void test() cil managed

{

// Code size 27 (0x1b)

.maxstack 2

.locals init ([0] int32[,] V_0,

[1] int32 i,

[2] int32[,] ia,

[3] int32 j)

IL_0000: ldnull

IL_0001: stloc.2

IL_0002: ldc.i4.s 10

IL_0004: ldc.i4.s 20

IL_0006: newobj instance void

[mscorlib]System.Array::$MR$16(class [mscorlib]System.EventHandler)

IL_000b: stloc.0

IL_000c: ldloc.0

IL_000d: call instance void [mscorlib]System.Array::Initialize()

IL_0012: ldloc.0

IL_0013: stloc.2

IL_0014: ldc.i4.2

IL_0015: stloc.1

IL_0016: ldloc.1

IL_0017: ldc.i4.2

IL_0018: mul

IL_0019: stloc.3

IL_001a: ret

} // end of method frmChild::test

Huh, System.Array::$MR$16? Doing something with

System.EventHandler? I just have no idea why this kind of code is

being generated. I'm going to punt and say you are suffering from

a compiler bug. Call Microsoft Support to get a workaround for

this. You've got a good diagnostic here. They'll charge

your creditcard but you'll get it back when they conclude this is a

MSFT bug, not yours. It isn't yours.

nobugz | Fri, 31 Aug 2007 14:49:00 GMT |

Hi nobugz!

thanks for your inputs. I have contacted MS support and waiting for their response. Will post their reply here for benefit of others

thanks

Suneet

nurbynerd | Fri, 31 Aug 2007 14:50:00 GMT |

Got a work around from MS Support, but the issue has been registered as a bug and they are trying to fix the same.

thanks again for the inputs.

nurbynerd | Fri, 31 Aug 2007 14:51:00 GMT |

Web Forms Hot Answers

Web Forms New questions

Web Forms Related Categories