How can I get the "this" from the C# code below to extend a static class to be used with another class in VB?
public static class Extensions
{
public static bool IsNullOrDefault<T>(this T? value) where T : struct
{
return default(T).Equals(value.GetValueOrDefault());
}
}
My VB code would be:
Public NotInheritable Class Extensions
Private Sub New()
End Sub
Public Shared Function IsNullOrDefault(Of T As Structure)(value As T?)
Return CType(Nothing, T).Equals(value.GetValueOrDefault())
End Function
End Class
But if I try to call that function in another class that references Extensions, I can't.
Go to the complete details ...