Advertisement
Guest User

Untitled

a guest
May 24th, 2016
56
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.24 KB | None | 0 0
  1. public bool Yo(object o){
  2.     if(o is string)
  3.         return o.Contains("Bella fica gu!"); // Non ti serve creare una variabile con un cast, e nemmeno crearti una variabile con as prima dell'if
  4.  
  5.     if(o is Point)
  6.         return o.X < 5;
  7.  
  8.     return false;
  9. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement