using System;
class Program
{
class SampleClass
/*
public int x;
private int y;
public void assign(int a, int b)
x = a + 1;
y = b;
}
*/
// public string Value { get; set; }
public int Price { get; set; }
public static void AlterString(string month) { month = "February"; }
public static void AlterArray(string[] holidays) { holidays[1] = "3"; }
static void Main()
int x = 8;
int b = 16;
int c = 64;
x /= c /= b;
Console.WriteLine(x + " " + b + " " + c);
SampleClass s = new SampleClass();
s.assign(1, 1);
Console.WriteLine(s.x + " " + s.y);
String string1 = "birthday";
String string2 = "party";
String string3 = string2;
Console.WriteLine((string3 == string2) + " " + string2.Equals(string3));
try
SampleClass s = null;
var value = s.Value;
catch(NullReferenceException ex)
Console.WriteLine($"Local: NullReferenceException");
throw;
catch(Exception ex)
Console.WriteLine($"Local: Exception");
finally
Console.WriteLine($"Local: finally");
Console.WriteLine($"Global: End of try");
catch(Exception e)
Console.WriteLine($"Global: {e.GetType().Name}");
string month = "January";
AlterString(month);
Console.WriteLine(month);
string[] holidays = new[] { "2", "5" };
AlterArray(holidays);
Console.WriteLine(holidays[0] + " " + holidays[1]);