Wrox Programmer Forums

Need to download code?

View our list of code downloads.

Go Back   Wrox Programmer Forums > C# and C > C# 1.0 > C#
Password Reminder
Register
Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read
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 .
DRM-free e-books 300x50
Reply
 
Thread Tools Display Modes
  #1 (permalink)  
Old April 1st, 2009, 09:33 PM
Registered User
 
Join Date: Sep 2007
Location: bandung, jawabarat, Indonesia.
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
Default lines of code

" 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.
Reply With Quote
  #2 (permalink)  
Old April 2nd, 2009, 07:43 AM
joefawcett's Avatar
Wrox Author
Points: 9,716, Level: 42
Points: 9,716, Level: 42 Points: 9,716, Level: 42 Points: 9,716, Level: 42
Activity: 9%
Activity: 9% Activity: 9% Activity: 9%
 
Join Date: Jun 2003
Location: Exeter, , United Kingdom.
Posts: 3,067
Thanks: 1
Thanked 37 Times in 36 Posts
Default

I've never heard of any limitation like that. What are the error details and how does it manifest itself?
__________________
Joe
http://joe.fawcett.name/
Reply With Quote
  #3 (permalink)  
Old April 2nd, 2009, 08:40 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

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."
===============================================
Reply With Quote
The Following User Says Thank You to dparsons For This Useful Post:
nandar_hayhay (April 8th, 2009)
  #4 (permalink)  
Old April 3rd, 2009, 09:26 AM
Authorized User
 
Join Date: Nov 2006
Location: Valparaiso, IN, USA.
Posts: 94
Thanks: 0
Thanked 1 Time in 1 Post
Default RE: lines of code

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!
Reply With Quote
The Following User Says Thank You to David_0223 For This Useful Post:
nandar_hayhay (April 8th, 2009)
  #5 (permalink)  
Old April 3rd, 2009, 09:33 AM
Wrox Author
Points: 13,255, Level: 49
Points: 13,255, Level: 49 Points: 13,255, Level: 49 Points: 13,255, Level: 49
Activity: 0%
Activity: 0% Activity: 0% Activity: 0%
 
Join Date: Oct 2005
Location: Ohio, USA
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons
Default

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."
===============================================
Reply With Quote
The Following User Says Thank You to dparsons For This Useful Post:
nandar_hayhay (April 8th, 2009)
  #6 (permalink)  
Old April 8th, 2009, 12:09 AM
Registered User
 
Join Date: Sep 2007
Location: bandung, jawabarat, Indonesia.
Posts: 9
Thanks: 3
Thanked 0 Times in 0 Posts
Default just reply

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.
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
Reducing code lines with suitable method john316 C# 2005 7 September 21st, 2007 10:43 AM
Add few Lines of code to All new aspx pages. gadhiav ASP.NET 1.0 and 1.1 Professional 3 October 19th, 2005 02:33 PM
dragging lines rajanikrishna Pro VB 6 0 April 24th, 2004 03:14 AM



All times are GMT -4. The time now is 07:06 PM.


Powered by vBulletin® Version 3.7.0
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.
© 2013 John Wiley & Sons, Inc.