Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- public class Program
- {
- public static void Main()
- {
- try{
- int a=10, b = 0;
- int c = a/b;
- Console.WriteLine("c = "+ c);
- }
- catch {
- Console.WriteLine("There is an divide by zero exeption, so it has been thrown here Catch block");
- }
- finally{
- Console.WriteLine("Finally block always will be executed");
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement