Skip to content

Instantly share code, notes, and snippets.

@mattn9x
Last active July 2, 2017 06:31
Show Gist options
  • Select an option

  • Save mattn9x/0e8ccde12ced00c0a5c6cce5e2597e9f to your computer and use it in GitHub Desktop.

Select an option

Save mattn9x/0e8ccde12ced00c0a5c6cce5e2597e9f to your computer and use it in GitHub Desktop.
Phân biệt tham chiếu, tham trị
static int check;
public static void ThayDoi1()
{
check = 1;
}
public static void Thaydoi2()
{
check = 2;
}
public static void ThayDoi3()
{
check = 3;
}
static void Main(string[] args)
{
check = 0;
ThayDoi1();
Console.WriteLine(check); // Kết quả in ra là: 1
Console.ReadLine();
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment