C#Programming questions specific to the Microsoft C# language. See also the forum Beginning Visual C# to discuss that specific Wrox book and code.
Welcome to the p2p.wrox.com Forums.
You are currently viewing the C# section of the Wrox Programmer to Programmer discussions. This is a community of tens of thousands of software programmers and website developers including Wrox book authors and readers. As a guest, you can read any forum posting. By joining today you can post your own programming questions, respond to other developers’ questions, and eliminate the ads that are displayed to guests. Registration is fast, simple and absolutely free .
" i just want to know if lines of code in a class are limited ".
if yes,how many lines of code in class can be accepted
by Visual studio.net 2005 ?.
Because i have once happened that in my class accepted some error, when the code got to 3000 lines,but when subtracted,the class went well. please somebody(if know) reply this queastion .thanks.
First off, if you have classes that are getting that big, you should probably be looking into refactoring that class. With that many number of lines things become unwieldy and hard to maintain.
Second, what was the EXACT error you were getting? Like Joe, I know of no limitation on the maximum number of lines that the compiler will allow in a single class. Are you sure this error wasn't caused by say an error on line 3000 and when you removed that line it therefore removed the error?
-Doug
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================
The Following User Says Thank You to dparsons For This Useful Post:
Just a quick note. If there is a limitation it will probably be related to the file size not the number of lines of code. For instance 4 gByte may be the file limitation. Probably not your problem.
__________________
What you don\'t know can hurt you!
The Following User Says Thank You to David_0223 For This Useful Post:
To that end, a 4GB file, the number of lines that a class file would have to have to be that large would be astronomical (after all, class files are nothing more than glorified text files). Besides, if the physical size of the file were the problem you would most certainly have troubles beyond actual compilation e.g. Visual Studio would physicially bomb when you tried to open this file because the system would simply run out of memory (I am assuming a typical development machine not some super PC with 16gb of RAM or something crazy like that).
If you are running the compiler from the command line you would have this issue with Visual Studio, obviously, but the chances of getting a class file that is 4GB is highly unlikely.
-Doug
__________________
===============================================
Doug Parsons
Wrox online library: Wrox Books 24 x 7
Did someone here help you? Click on their post!
"Easy is the path to wisdom for those not blinded by themselves."
===============================================
The Following User Says Thank You to dparsons For This Useful Post:
it's not error on line 3000,but vs.net could not be debugged..and when i subtracted the class, it went well..,i did not know what the reall matter.i forgot the error VS.net showed,because it happened in the past and i forgot the exact date,but thank you for all who replied my question.i will search for the matter.
Last edited by nandar_hayhay; April 8th, 2009 at 12:16 AM.