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: 
VB actually has 2 notions of casting. 

1. CLR style casting
2. Lexical Casting

CLR style casting is what a C# user is more familiar with. This uses the CLR type system and conversions in order to perform the cast. VB has DirectCast and TryCast equivalent to the C# cast and as operator respectively.

Lexical casts in VB do extra work in addition to the CLR type system. They actually represent a superset of potential casts. Lexical casts are easily spotted by looking for the C prefix on the cast operator: CType, CInt, CString, etc ... These cast, if not directly known by the compiler, will go through the VB run time. The run time will do interpretation on top of the type system to allow casts like the following to work

```
Dim v1 = CType("1", Integer)
Dim v2 = CBool("1")

```
[Adam Robinson](https://stackoverflow.com/questions/748725/casting-in-visual-basic/748732#748732) is correct, also [`DirectCast`](http://msdn.microsoft.com/en-us/library/7k6y2h6x(VS.71).aspx) is available to you.