C # fine for the number of lines of code?

Are there restrictions or penalties for the amount of code inside my form home.cs?

I am writing the front end of a database application in C # in Visual Studio 2008. The way everything is built up, I use the way to go to the information displayed to end users, instead of using new forms.

Starting with VBA / MS Access, I remember that if you go to a certain number of lines of code, this will lead to an error, not a compilation. Will C # do this in Visual Studio 2008, or can I suffer from a performance hit? I know that code readability can be a problem because everything will be in one place, but I can also see this as an advantage in some situations.

+3
source share
7 answers

These are not lines of code in your .cs files that you need to worry about in terms of performance — they are the number of controls on your form at run time that can cause problems. If there are only a few controls on multiple tabs, you won't have a problem. If you have hundreds of controls on multiple tabs, you might experience performance issues (not to mention usability issues - I personally hate tab controls with multiple tab rows).

, , , , , . , .

, , , . usercontrols, usercontrol.

+9

, , - , .

, , -, .

+3

, , , . , . MSDN .

, , , , . , , , Dock = DockStyle.Fill, Visible Enabled, ? , .

- , - CardLayout Java. GNU Classpath , , .

+2

" , , , ".

, , , , , , , , , .

, , , VS , , , , .

. !

+2

.

.

, , , , . , , .

+1

That sounds awful, but I see no reason why this would be a problem.

0
source

I have a form that is inherited by my new work, which had over 30,000 lines. He is completely cancer. Please think before encoding and modulating!

0
source

Source: https://habr.com/ru/post/1699569/


All Articles