C Sharp: Versiyalar orasidagi farq

Vikipediya, ochiq ensiklopediya
Kontent oʻchirildi Kontent qoʻshildi
Tahrir izohi yoʻq
Qator 2: Qator 2:


= Misol =
= Misol =
Consolda yozilgan hello world
<pre>
<pre>
using System;
using System;
Qator 13: Qator 14:
}
}
</pre>
</pre>
Windows Formada yozilgan hello world

<pre>
using System;
using System.Windows.Forms;
namespace WindowsFormsApplication1
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
private void button1_Click(object sender, EventArgs e)
{
label1.Text = "Hello, World!";
}
}
}
</pre>
{{stub}}
{{stub}}



24-May 2013, 04:49 dagi koʻrinishi

C# (talaffuzi: si sharp) dasturlash tili Microsoft korporatsiyadan obyekt moʻljallangan dasturlash tilidir. U .NET texnologiyasi bilan reliz kelishdi, keyingi ECMA va ISO standartlarini ham oladi.

Misol

Consolda yozilgan hello world

using System;

namespace AssalomuAlaykum {
    class Program {
        static void Main(string[] args) {
            Console.WriteLine("Hello, world!");
        }
    }
}

Windows Formada yozilgan hello world

using System;
using System.Windows.Forms;
 
namespace WindowsFormsApplication1
{
    public partial class Form1 : Form
    {
        public Form1()
        {
            InitializeComponent();
        }
        private void button1_Click(object sender, EventArgs e) 
        {
            label1.Text = "Hello, World!";
        }
    }
}