static void Main(string[] args) { //Conversions Money m = new Money(42.42M); decimal amount = m; int truncatedAmount = (int)m; Calculator ca = new Calculator(); Console.WriteLine(ca.CalculateDiscount(new Prodcut() { Price = 10 })); Console.WriteLine(string.Concat("To box or not box", 42, true)); Console.WriteLine("-----------------------------------"); Celal cel = new Celal() { Yas = 35 }; Console.WriteLine(cel.Yas); Console.WriteLine(YasDegis(cel)); Console.WriteLine(cel.Yas); Console.Read(); Object stream = new MemoryStream(); MemoryStream memoryStream = (MemoryStream)stream; double x = 1234.7; int a; // Cast double to int a = (int)x; // a = 1234 }
public static int YasDegis(Celal par) { return(par.Yas = 30); }
public static int YasDegis(Celal par) { return par.Yas = 30; }