Sunday 3 December 2017

C# Program to Demonstrate Environment Type


Code:

using System;
class Program
{
    static void Main()
    {
        try
        {
            Environment.Exit(0);
        }
        finally
        {
            Console.WriteLine("Statement that is Never Reached");
        }
        Console.Read();
    }
}


Output:

// No Output is obtained
// Calls the Environment.Exit method and returns a zero status code.
// The finally statement is never reached.


More C# Programs:






















100+ Best Home Decoration Ideas For Christmas Day 2019 To Make Home Beautiful

Best gifts for Christmas Day | Greeting cards for Christmas Day | Gift your children a new gift on Christmas day This Christmas d...