add csharp examples (#10)
This commit is contained in:
committed by
Aditya Bhargava
parent
c3396b8b0a
commit
62ed616954
30
03_recursion/csharp/02_greet/Program.cs
Normal file
30
03_recursion/csharp/02_greet/Program.cs
Normal file
@@ -0,0 +1,30 @@
|
||||
using System;
|
||||
|
||||
namespace ConsoleApplication
|
||||
{
|
||||
public class Program
|
||||
{
|
||||
public static void Main(string[] args)
|
||||
{
|
||||
Greet("adit");
|
||||
}
|
||||
|
||||
private static void Greet(string name)
|
||||
{
|
||||
Console.WriteLine($"hello, {name}!");
|
||||
Greet2(name);
|
||||
Console.WriteLine("getting ready to say bye...");
|
||||
Bye();
|
||||
}
|
||||
|
||||
private static void Greet2(string name)
|
||||
{
|
||||
Console.WriteLine($"how are you, {name}?");
|
||||
}
|
||||
|
||||
private static void Bye()
|
||||
{
|
||||
Console.WriteLine("ok bye!");
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user