Here's the code in VB.Net
If Not queryItems Is Nothing Then
For Each qItem As String In queryItems
qItem = qItem.ToLower()
Next
End If
and it's "equivalent" code in c# (using sharpdevelop/developerfusion/telerik's converter/VS 2012 "paste as c#" method)
if (queryItems != null)
{
foreach (string qItem in queryItems)
{
qItem = qItem.ToLower();
}
}
The C# compiler (rightly so ) complains with the following
"Cannot assign to 'qItem' because it is a 'foreach iteration variable'"
I am wondering why this behavior is permitted in VB.Net?