function within function C# code example
Example: function within function C#
public static void Main(string[] arg) {
Console.WriteLine("hello");
void World() {
Console.WriteLine("world")
}
world();
}
/*
output:
hello
world
*/
public static void Main(string[] arg) {
Console.WriteLine("hello");
void World() {
Console.WriteLine("world")
}
world();
}
/*
output:
hello
world
*/