In VB.NET, you can use either
+
or
&
to concatenation strings:
Concatenation Operators in Visual Basic[
^]
The
+
operator is primarily intended for numeric addition. It has a complex set of rules that determine whether to add, concatenate, produce a compiler error, or throw a run-time exception.
The
&
operator always converts its operands to strings if necessary, and concatenates the strings.
Dim x As String = "40" + 2
Dim y As String = "40" & 2
Therefore, you should always use the
&
operator to concatenate strings.
Return facetDefinition.Where(Function(fd) fd.GetFacetCount(reader, mainQueryFilter) > 0).[Select](Function(fd) New KeyValuePair(Of [String], [String])(System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(fd.FacetValue) & "(" & fd.GetFacetCount(reader, mainQueryFilter) & ")", fd.FacetValue))