Introduction
I have used Visual Studio 2012 for debugging purpose. But you can use any version of visul studio as per your availability..
using System; public class functionexcercise { public static void welcome(string name) { Console.WriteLine("Welcome " + name ); } public static void HaveAnice() { Console.WriteLine("Have a nice day"); } public static void Main(string[] args) { string str1; Console.Write("Please Enter a name : "); str1 = Console.ReadLine(); welcome(str1); HaveAnice(); Console.ReadLine(); } }
Result
![Write a C# program to create a user define function with parameter](https://techstudys.com/wp-content/uploads/2021/07/1-1-18.png)