shrosario Posted March 9, 2003 Posted March 9, 2003 Does VB.NET have a 64K procedure size limit like VB6? Quote
*Gurus* divil Posted March 9, 2003 *Gurus* Posted March 9, 2003 I don't think so. I don't recall vb6 having that limitation either, although I asked a friend and he recalls something about the old VB6 IDE not being able to handle files over a certain size. Quote MVP, Visual Developer - .NET Now you see why evil will always triumph - because good is dumb. My free .NET Windows Forms Controls and Articles
zzdv Posted March 12, 2003 Posted March 12, 2003 No VB.NET doen't have that limitation. Good news Quote
*Experts* Nerseus Posted March 12, 2003 *Experts* Posted March 12, 2003 I'm not sure what you mean by size limit... If you mean total size of variables declared in a subroutine, there is no 64k limit in VB6 or VB.NET (declare an array of bytes of size 100000 for instance). If you mean total size of code, compiled, I'm not sure I'd know how to check that. If you mean total number of lines of code, there is indeed a limit of about 64k. In VB6, I pasted in the following: Dim l as Long l = l + 1 ' Copied this line 65522 times!!! If I try pasting one more line of code, the VB6 IDE gives me an "Out of Memory" MsgBox - not while running, just while trying to paste the line of code. If you try to insert a few blank lines in the middle, the IDE just crashes... In VB.NET I get similar results, but they're not as consistent. Pasting in a ton of code sometimes gives me an error at design time (a MsgBox in the IDE). Other times I can run, but the results of the code are wrong. For instance, running "l = l + 1" 202,000 times gives me the answer "123,456.79" - obviously some kind of overflow bug. Running the same program a second time gives me a runtime error of "Common Language Runtime detected an invalid program.". Of course, all of this should never happen in "real life". A routine that large is horrible programming practice... -Nerseus Quote "I want to stand as close to the edge as I can without going over. Out on the edge you see all the kinds of things you can't see from the center." - Kurt Vonnegut
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.