In Visual Basic I'd write this: If stringVariable IsNot Nothing then Dim x as Integer x = stringVariable.Length End If I test the string for null/nothing because if I try to get the Length of a ...
When engaging in cross-language development, it's important to worry about nothing – the Visual Basic Nothing keyword, that is, and how it varies from the C# null counterpart. When initializing ...