DEV Community

Firdavs Mukhsimov
Firdavs Mukhsimov

Posted on

Namespace

a)Namespace nima?

Namespace (nomlar maydoni)-Bu dasturdagi sinflar,
 interfeyslar, strukturalar va boshqa elementlarni
 mantiqiy guruhlash uchun foydalaniladigan tushuncha.
Enter fullscreen mode Exit fullscreen mode

b)Namespace qanday ishlatiladi?

namespace Transportlar
{
    class Avtomobil
    {
        public string model;
        public void Yurish()
        {
            Console.WriteLine(model + " harakatlanmoqda.");
        }
    }

Enter fullscreen mode Exit fullscreen mode

c)Quydagi kodni tahlil qiling:

using System;
namespace MyNamespace
{
  class Program
  {
    static void Main(stringll args)
    {
      Console WriteLine ("Hello World!");
    }
  }  
}
Enter fullscreen mode Exit fullscreen mode

Top comments (0)