What are the practical applications of classes in c#? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What are the practical applications of classes in c#?

What can we do with classes and objects in real world programming?

6th Jul 2020, 4:45 AM
kavish bamboli
kavish bamboli - avatar
3 Answers
+ 4
Classes and objects have more practical application than any other concept. Almost every GUI(Graphical User Interface) application that exists in the world uses object oriented programming. Even AAA games use classes and objects in them.
6th Jul 2020, 4:49 AM
Arsenic
Arsenic - avatar
+ 1
For example, the graphical user interface (GUI) of applications on PC consists of multiple components like buttons, edit texts, drop-down lists, images, radio buttons, etc. These are instances of classes (objects). You define the class once, then you can use the same base code multiple times. For example, you define one class "Button", and then you may create objects of it and place as many buttons as you need on your form (window). All buttons are sharing the same base concept, but each of them has its own attributes like size, position in the window, color or style, an "OnClick" method, etc.
9th Jul 2020, 3:42 AM
Vasile Eftodii
Vasile Eftodii - avatar
12th Jul 2020, 4:41 AM
kavish bamboli
kavish bamboli - avatar