In the lesson nested classes, we learned that we can declare classes inside other classes.
Însă, în lecția despre clase imbricate am aflat că putem declara clase în interiorul altor clase.
As already stated, whenever you have alternatives and you don't have to illustrate the concept of real world sub-object, avoid using nested classes.
După cum am menționat deja, ori de câte ori aveți alternative și nu trebuie să ilustrați conceptul de sub-obiect din lumea reală, evitați utilizarea claselor imbricate.
As a general rule, nested classes are a rarely used programming concept, mainly because they increase the complexity and the structure of the code, and also because they add up to the nested levels.
Ca regulă generală, clasele imbricate sunt un concept de programare rar folosit, în principal deoarece acestea sporesc complexitatea și structura codului și adaugă nivele imbricate.
C# offers nested classes, which just like all the other nested programming concepts, implies a construct (class) defined inside the body of another construct (class).
Clase imbricate C# oferă clase imbricate care, la fel ca toate celelalte concepte de programare imbricate, implică un construct definit în interiorul corpului unui alt construct.
The class defined this way is called "inner class", while the one which contains it, is called "outer class"... Read more Tags: class, inner class, nested classes, object oriented programming, objects, OOP
Clasa definită în acest fel se numește "clasa interioară", în timp ce clasa care o conține se numește "clasă exterioară"... clasă, clasă interioară, clase imbricate, obiecte, OOP, programarea orientată pe obiecte
Nested classes are declared the same way as the normal classes are declared, but they are declared inside the body of another class.
Clasele imbricate sunt declarate la fel ca și clasele obișnuite, cu diferența că sunt declarate în interiorul corpului unei alte clase.
Potentially sensitive or inappropriate content
Examples are used only to help you translate the word or expression searched in various contexts. They are not selected or validated by us and can contain inappropriate terms or ideas. Please report examples to be edited or not to be displayed. Potentially sensitive, inappropriate or colloquial translations are usually marked in red or in orange.