✅ Window Forms.NET question..
are all of the objects that are accessible from toolbox (window forms .NET) created by using delegates and events that hold methods that we write in our code??
18 Replies
the designer generates the code that makes the ui for you
controls (the objects that are accessible from toolbox) are basically a class that gets instantiated and added to the window
you can see the generated code
this code looks like code of delegates, dont you think so?
not this
the other generated code thats hidden by default
but are those buttons delegatesa/
?
this is an event handler
a delegate is a reference to a method
this is the method that is being referenced
oh, right my bad :)
the reason why i am asking this question is
do i need to learn how delegates and events work in order to code WinForms .NET application?
it would help you understand the framework a lot better yes
and its useful to know in general
delegates are heavily used in LINQ for example
btw, where do you recommend to learning to build WindForm application?
i dont recommend winforms
learn wpf/uwp/winui 3/avalonia
wpf is probably the easiest to get started with since its the oldest, with the most resources online
once you know one xaml framework it isnt hard to switch to another one
do they have same logic?
in terms of programming language's logic
not sure what youre asking
if i know how to code in winforms, will i be able to code in avalonia ?
theyre all c#
youll need to learn xaml
but once you do, youll have a much much better experience than winforms
you write the ui in xaml instead of using a designer
i dont have time :(
it is for school project, we have to create application in c# winforms
oh
well use winforms then
the way i learned is by googling whenever i encountered an issue
!solved
$close
Use the
/close
command to mark a forum thread as answered