Check out example codes for "How to make a function in C#". It will help you in understanding the concepts better.

Code Example 1

public void SayHello(string name) 
{
    Console.WriteLine("Hello")  
}


Console.WriteLine("What is your name?")
string name = Console.ReadLine() ; 

SayHello(Adam)

Learn ReactJs, React Native from akashmittal.com