473,320 Members | 1,863 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

InvalidProgramException

Hi,

I have a major roadblock , where while debugging/running I get and InvalidProgramException (detected by the CLR) .
This occurs when the program flow goes into a very large method with maybe 1000 case statements . (Code that was autogenerated based on some other constraints) . {All code is in C# using .NET Framework 1.1 }

I researched this exception in mSDN and was pointed to see article Q312544, "What to Do If You Receive an InvalidProgramException Error Message"
I cannot find this article !

Breaking this method up into smaller methods is not my first choice so if anyone knows any other way to make this work please respond .

Thanks
Ryan
Jul 21 '05 #1
1 2042
> I have a major roadblock , where while debugging/running I get and
InvalidProgramException (detected by the CLR) .
This occurs when the program flow goes into a very large method with maybe 1000 case statements . (Code that was autogenerated based on some
other constraints) . {All code is in C# using .NET Framework 1.1 }
I researched this exception in mSDN and was pointed to see article Q312544, "What to Do If You Receive an InvalidProgramException Error
Message" I cannot find this article !

Breaking this method up into smaller methods is not my first choice so if

anyone knows any other way to make this work please respond .

If your method exceed the maximum size of a method you have no choice, you
have to break your method in several smaller methods. You also can use
if-statements instead of case-statements since if produces far less code.

Why do you need such a large case statement? Does this logic really have to
be precompiled?Performance reasons?

Could you please show (at least a part) of your method *please*.

Iam so nosey :)

--
cody

[Freeware, Games and Humor]
www.deutronium.de.vu || www.deutronium.tk
Jul 21 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Ryan M | last post by:
Hi, I have a major roadblock , where while debugging/running I get and InvalidProgramException (detected by the CLR) . This occurs when the program flow goes into a very large method with maybe...
0
by: Ivana | last post by:
Hi. I'm having trouble with my PocketPC program. I'm getting an InvalidProgramException when the SqlCeDataAdapter.Fill() method is called, and I have no clue why! Is there anybody who can tell me...
0
by: Phoon Chee Keong | last post by:
Hi all, I get an error while I using vb.net 2003. An unhandled exception of type 'System.InvalidProgramException' occurred in PV1.exe Additional information: Common Language Runtime detected...
5
by: kosak | last post by:
Hello. When I run the program below, I get the exception System.InvalidProgramException: Common Language Runtime detected an invalid program. (Visual Studio 2005 version 8.0.50727.51) I can...
2
by: Dennis Zickefoose | last post by:
The following code yields error CS0131: "The left-hand side of an assignment must be a variable, property or indexer": (new int())++; However, when using a class with a custom operator++, an...
8
by: HELLO $$$ | last post by:
To those who are familiar to MS Visual studio : I have recently Visual Studio 2005. Please can any body tells me , when I write a code: How can I separate the files of such code from the Studio...
7
by: Pixel.to.life | last post by:
Gurus, Another question on one of the coveted Microsoft products: JIT debugger with VS2005. I have a managed app that builds great on one machine (Vista Home basic, VS2005, JIT enabled for...
3
by: Pixel.to.life | last post by:
All, A question on JIT debugging with VS2005. I have a managed app that builds great on one machine (Vista Home basic, VS2005, JIT enabled for managed/unmanaged code). I can also debug it...
0
by: Pixel.to.life | last post by:
Gurus, Another question on one of the coveted Microsoft products: JIT debugger with VS2005. I have a managed app that builds great on one machine (Vista Home basic, VS2005, JIT enabled for...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.