In c# programming if we include function call within the button click with definition more than 20 lines..........does it improves the performance (speed) of the program when compared with writing that 20lines within the button click function ...............
Jessurider
-10
Posting Whiz in Training
Recommended Answers
Jump to PostIt's faster to have the code inside the button click event as any call to a method has some overhead. But we are talking about millionths of a second, you won't notice.
Jump to PostIt won't be faster at all. Saying that it is 20 lines is really meaningless, because 1 of those lines might be really slow. If you want to post some code, we might be able to help you further.
Another thing you might be able to do is use …
All 7 Replies
Momerath
1,327
Nearly a Senior Poster
Featured Poster
Tekmaven
258
Software Architect
Team Colleague
Momerath
1,327
Nearly a Senior Poster
Featured Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
Jessurider
-10
Posting Whiz in Training
Momerath
1,327
Nearly a Senior Poster
Featured Poster
ddanbe
2,724
Professional Procrastinator
Featured Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.