//decimal_datatype_1.cs using System; public class TestDecimal { public decimal d = 10.9m; public int n ; } class test { static void Main () { TestDecimal t = new TestDecimal(); Console.WriteLine("enter some number"); t.n = Int32.Parse(Console.ReadLine()); Console.WriteLine(t.d + t.n); // Result converted to decimal } } |