Class va Constructor
Firdavs Mukhsimov
Posted on October 11, 2024
a)Constructor nima?
Konstruktor – bu sinfdan ob'ekt yaratilganda
avtomatik ravishda chaqiriladigan maxsus usuldir.
b)Quyidagi kodni to'ldiring:
class Animalpublic string Name;
public Animal(________)
Name = name;
Animal dog = new Animal("Dog");
Console. WriteLine (dog.Name);
💖 💪 🙅 🚩
Firdavs Mukhsimov
Posted on October 11, 2024
Join Our Newsletter. No Spam, Only the good stuff.
Sign up to receive the latest update from our blog.