I need to check if a given object implements an interface. In C# I would simply say:
if (x is IFoo) { }
Is using a TryCast()
and then checking for Nothing the best way?
I need to check if a given object implements an interface. In C# I would simply say:
if (x is IFoo) { }
Is using a TryCast()
and then checking for Nothing the best way?
Use following online web solution for same and all other code conversion visa-versa.
Thanks
http://www.developerfusion.com/tools/convert/csharp-to-vb/ is also a great conversion tool.