C# PROGRAM TO ADD TWO INTEGERS USING METHOD :

Sample Output:

Add-Two-Nums-using-Function 

Explanation :
In the above program the function static public int Add(int a,int b) , we are declaring function as Static . Because, c# is a Object Oriented Programming Language. And in OOP language, a function can be called using object of a class. And if we want to call function without creating object, we have to declare it as static.

For C Program : C Program to Add Two Numbers Using Function

Leave a Reply

Your email address will not be published. Required fields are marked *