Click here to Skip to main content
15,791,496 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:

I'm rather new to c# and would like to know if anybody knows what the equivalent c# method is for the delphi 'Supports' function. It compares functionality of recordsets and I cannot find a method that does the same in c#.

Thanks in adnvane,

1 solution

Check it using IS. With c# the support for interfaces is more native to the language so can be handled like any other class type.

if (myObject is IMyInterface)
   IMyInterface iMyInterface= (IMyInterface) myObject;
   console.WriteLine ("Interface unsupported");

Good luck!
Share this answer

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