Poornimab already gave you the answer, but the next time you need to
translate from C# to VB.NET, you might want to save yourself some time
and use this nifty online translator :
That on-line converter is usually pretty good, but it fails to convert the
original poster's sample.
Our C# to VB converter (Instant VB) will convert what the on-line converters
can't.
--
David Anton www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter
Instant C++: VB to C++ converter
Poornimab gave the correct translation (same as our converter).
The equivalent to the C# "x is y" in VB is "TypeOf x Is y", not "x = y".
--
David Anton www.tangiblesoftwaresolutions.com
Instant C#: VB to C# converter
Instant VB: C# to VB converter
Instant C++: C# to C++ converter
Instant C++: VB to C++ converter