Advertisement
Fhernd

OrdenCatch.cs

Jul 26th, 2014
4,259
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.45 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Articulos.Cap04
  4. {
  5.     public sealed class OrdenCatch
  6.     {
  7.         public static void Main()
  8.         {
  9.             object o = null;
  10.            
  11.             try
  12.             {
  13.                 int i = (int) o;
  14.             }
  15.             catch (Exception e)
  16.             {
  17.                 //...
  18.             }
  19.             catch (InvalidCastException e)
  20.             {
  21.                 //...
  22.             }
  23.         }
  24.     }
  25. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement