N
N
neitoo2022-02-19 11:04:36
C++ / C#
neitoo, 2022-02-19 11:04:36

How to work with variables in winforms?

Perhaps a stupid question, but still interesting how to write code correctly.

For an example, when working in winforms, you need to display at the end, count the values ​​of variables in one textbox. So that's where to properly initialize them, where to count them, and so on? I think it's not right to do it all in one button handler, for example?

Answer the question

In order to leave comments, you need to log in

2 answer(s)
F
freeExec, 2022-02-19
@freeExec

If you can do everything in one button, then why not, why spray code across five files?

V
Vladimir Korotenko, 2022-02-19
@firedragon

Try like this. The point is that there would be less logic in the form
https://github.com/vkorotenko/HabrQnaNetSamples/bl...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question