Click here to Skip to main content
16,014,591 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
what is "is" in if condition, if (editor is GridTextColumnEditor) and how it executes generally?
Posted

1 solution

What is does is to check if the given object inherits from the specified type:
Button b = new Button();
C#
if (b is Button)
   {
   // True!
   }
if (b is Control)
   {
   // True!
   }
if (b is Typewriter)
   {
   // False!
   }
 
Share this answer
 
Comments
Sergey Alexandrovich Kryukov 11-Nov-11 11:59am    
Yes, a 5.
--SA
durgeshtupkar10 12-Nov-11 0:07am    
thnx SAKryukov

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900