C# Program using the static method


In this program, You will learn how to implement the static method in C#.


static void msg(){ 
   //statement
}

Example: How to implement a static method in C#.

using System;
public class Test
{
	static void msg()
	{
		Console.WriteLine("static method is called here");
	}

	public static void Main(string[] args)
	{
		msg();
	}
}

Output:

static method is called here