VB Sucks
Posted: Tue May 19, 2015 3:07 pm
I mean, duh. But seriously!?
C++ Equivalent
If If(str, "").Contains("html") Then
/* .. */
End If
C# Equivalent
if (str ?? "").Contains("html") {
/* .. */
}
Note: This is the null coalesce operator. It is syntactic sugar for a null check (see below).C++ Equivalent
if (str != NULL && strstr(str, "html") != NULL) {
/* .. */
}
On the bright (slightly less pitch black) side, at least I didn't have to type the "Nothing" keyword.