The block statement is used to write multiple segments of program in logical group.
Example:
Example:
using System;
namespace Block_statement
{ //Begin Statement
class Program
{ // Begin Statement
static void Main(string[] args)
{ //Begin Statement
int num1,power;
num1 = 5;
power = num1 * num1;
Console.WriteLine(power);
Console.ReadLine();
} // End Statement
} // End Statement
} // End Statement
namespace Block_statement
{ //Begin Statement
class Program
{ // Begin Statement
static void Main(string[] args)
{ //Begin Statement
int num1,power;
num1 = 5;
power = num1 * num1;
Console.WriteLine(power);
Console.ReadLine();
} // End Statement
} // End Statement
} // End Statement
Comments
Post a Comment