C# program for Empty Statement




Here this is the one example of the Empty Statement program.

In this program we will study what is Empty Statement and how to write a program.

An Empty Statement means we did not write any codes in the statement section only ";"(semi-colon), which
will end the statement.

 NOTE : The program will be run into infinity loop because of my code, than we just need to close the Command Prompt to stop the execution.

ENJOY CODING !!!!
___________________________________________________________________________________



using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Empty_Statement
{
    class PostSlush
    {
         public bool print()
      {
        Console.WriteLine("PostSlush.com");
        return true;
      }
        static void Main(string[] args)
        {
            int a = 0;
        PostSlush p = new PostSlush();
        while (p.print())
         {
           ; //An Empty Statement
         }
        Console.WriteLine("a = {0}", a);
        Console.ReadLine();
        }
    }
}


Output :


Previous Post Next Post