what is function in c# code example
Example 1: function in c#
//function example
using System;
public class Program
{
static void function(){
Console.WriteLine("I am a function!");
}
public static void Main()
{
function();
}
}
Example 2: function c#
public int AddNumbers(int number1, int number2)
{
int result = number1 + number2;
return result;
}