Answers for "function in c#"

C#
2

How to make a function in C#

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


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

SayHello(Adam)
Posted by: Guest on March-25-2020
0

function in c#

//function example
using System;
					
public class Program
{
	static void function(){
		Console.WriteLine("I am a function!");
	}
	public static void Main()
	{
		function();
	}
}
Posted by: Guest on March-30-2020

C# Answers by Framework

Browse Popular Code Answers by Language