I am trying to convert this code from csharp to vb. Used all kids of free csharp to vb converter but getting an error. please let know if anyone has solved this problem before.
error:
Class 'QueryParameterComparer' must implement 'Function Compare(x As OAuthBase.QueryParameter, y As OAuthBase.QueryParameter) As Integer' for interface 'System.Collections.Generic.IComparer(Of QueryParameter)'
from c#code:
protected class QueryParameterComparer : IComparer<QueryParameter>
{
public int Compare(QueryParameter x, QueryParameter y)
{
if (x.Name == y.Name)
{
return string.Compare(x.Value, y.Value);
}
else
{
return string.Compare(x.Name, y.Name);
}
}
}
to vb code
Protected Class QueryParameterComparer
Implements IComparer(Of QueryParameter)
#Region "IComparer Members"
Public Function Compare(ByVal x As QueryParameter, ByVal y As QueryParameter) As Integer
If x.Name = y.Name Then
Return String.Compare(x.Value, y.Value)
Else
Return String.Compare(x.Name, y.Name)
End If
End Function
#End Region
End Class