C# can't assume the object type of
row[this_key]
.
I think VB .Append will cast the object as a string. C#'s extension model can't do that and doesn't have the same "Append" method anyway.
Instead, try using "+=":
rows[this_key] += "<\td>";
This is shorthand for:
rows[this_key] = rows[this_key] + "<\td>";
The right hand side should be able to either cast or call
ToString()
as it is effectively concatenating two strings.
Failing that, just use the second version adding the
ToString()
yourself:
rows[this_key] = rows[this_key].ToString() + "<\td>";