a method can return only either single value or no value if no then it's declared as void method();
'int' datatype is sub datatype of 'double'.Hence, when first part of func() is executed it is integer part and hence when second part is executed it is double.
Output:10
35.78
C# provides feature of method overloading which means methods with same name but different types and arguments.
First constructor 'sample' is called and hence then destructor '~sample' is evaluated.
Output : 10.5, 5.5
Static constructor is a constructor which can be called before any object of class is created or any static method is invoked.Static constructor is implicitly called by .net CLR.