News:

Choose a design and let our professionals help you build a successful website   - ITAcumens

Main Menu

is Operator for C# .Net interfaces - C# :

Started by sukishan, Jul 11, 2009, 02:51 PM

Previous topic - Next topic

sukishan

is Operator for C# .Net interfaces - C# :
  A new C# operator that can be used to define that class should be explained. It is the is operator. Look at the following piece of code:

if(nodeC is INode)
     Console.WriteLine("nodeC is object of INode type");
else
     Console.WriteLine("nodeC isn't object of INode type");


   In example nodeC object was created as ClonableNode type, but when we run program "if operator" returns true. It means that nodeC also is of INode type. 
A good beginning makes a good ending

Quick Reply

Warning: this topic has not been posted in for at least 120 days.
Unless you're sure you want to reply, please consider starting a new topic.

Note: this post will not display until it has been approved by a moderator.

Name:
Email:
Verification:
Please leave this box empty:
Type the letters shown in the picture
Listen to the letters / Request another image

Type the letters shown in the picture:

Shortcuts: ALT+S post or ALT+P preview