Answers for "functions c#"

C#
6

c# funtion

public int AddNumbers(int number1, int number2){    int result = number1 + number2;    if(result > 10)    {    return result;    }    return 0;}
Posted by: Guest on November-25-2019
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
2

function c#

public int AddNumbers(int number1, int number2)
{
    int result = number1 + number2;
    return result;
}
Posted by: Guest on August-21-2020
-1

functions c#

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

public void SayName()
{
	Console.WriteLine("What is your name?");
	string name = Console.ReadLine(); 
	SayHello(name);
}
Posted by: Guest on September-03-2020

C# Answers by Framework

Browse Popular Code Answers by Language