473,461 Members | 1,501 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

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 2047
> 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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?

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.