Question: I want to check multiple controls state in one method, in C# this would be accomplished like so:

```
if (((CheckBox)sender).Checked == true)
{
    // Do something...
}
else
{
    // Do something else...
}

```

So how can I accomplish this in VB?

Answer: 
DirectCast will perform the conversion at compile time but can only be used to cast reference types.
Ctype will perform the conversion at run time (slower than converting at compile time) but is obviously useful for convertng value types.
In your case "sender" is a reference type so DirectCast would be the way to go.
Casting in VB.net uses the keyword `ctype`.
So the C# statement `(CheckBox)sender` is equivalent to `ctype(sender,CheckBox)` in VB.net.

Therefore your code in VB.net is:

```
if ctype(sender,CheckBox).Checked =True Then
    ' Do something...
else
    ' Do something else...
End If

```