c# quick "is" "as"

if (randomObject is TargetType tt)
{
    // Use tt here
}