Avatar of Indunil Sanjeewa Amarasinghe
Indunil Sanjeewa Amarasinghe
Flag for Sri Lanka asked on

Preventing Methods stacking in c#

Dear Sir/Madam,

I need to find out how best I can avoid methods stacking in a C# windows application like this?
Its a project I have already done to some extent. I just need to make improvements to it.

What is the best approach I can apply to avoid this situation?
I have a lot of controls added to the forms as well.

A();
B();
C();
D();
E();
F();

Kind Regards,
Indunil Sanjeewa
C#

Avatar of undefined
Last Comment
David Johnson, CD

8/22/2022 - Mon
AndyAinscow

>>What is the best approach I can apply to avoid this situation?

Well you could put all the code into one method so it will just be
A();
but I would not advise that in terms of writing nicely structured code.  Maybe you aren't being clear but I do not see anything wrong in principle with:
A();
B();
C();
D();
E();
F();
David Johnson, CD

@AndyAinscow  You're not the only one that is not clear on the askers objective
ASKER CERTIFIED SOLUTION
Dmitry G

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
David Johnson, CD

Most clear answer to an unclear question
Experts Exchange is like having an extremely knowledgeable team sitting and waiting for your call. Couldn't do my job half as well as I do without it!
James Murphy