try catch with finally : Try Catch : Language Basics C# Source Code


Custom Search

C# Source Code » Language Basics » Try Catch »

 

try catch with finally








    

    using System;
    using System.Collections;

class Class1 {
   static void Main(string[] args) {
    long lngResult;
    long lngValue = 0;

    try {
      lngResult = 8 / lngValue;
    }
    catch {
      Console.WriteLine("catch");
    }
    finally {
      Console.WriteLine("finally");
    }
   }
}


           
       
    
   
  
   







HTML code for linking to this page:

Follow Navioo On Twitter

C# Source Code

 Navioo Language Basics
» Try Catch