By GokiSoft.com| 16:01 02/10/2021|
C Sharp

[Video] Giới thiệu về ngôn ngữ lập trình C# & .NET Framework + Khai báo biến trong C# BT1391

[Video] Giới thiệu về ngôn ngữ lập trình C# & .NET Framework + Khai báo biến trong C#



#Program.cs


using System;

//coding convension C# => Namespace => Lession, SinhVien => Chu y.
namespace Lession1
{
    //same Namespace
    class Program
    {
        //same Namespace
        static void Main(string[] args)
        {
            //Bien => viet thuong chu cai dau tien
            int x1;
            x1 = 12;
            int tongSo = 100;

            string str1 = "Sinh Vien Aptech";//data type => using this.
            String str2 = " HN";//class object

            string str = str1 + str2;

            Console.WriteLine(str);

            Console.WriteLine("Hello World! x1 = {0}, tongSo = {1}", x1, tongSo);

            Console.WriteLine("Hello World! x1 = " + x1 + ", tongSo = " + tongSo);
        }
    }

    class Test {
        //same Namespace => follow.
        void ShowHello() {
            Console.WriteLine("Test ...");
        }
    }
}


Liên kết rút gọn:

https://gokisoft.com/1391