CS0019 error in HubSpot.Net.Examples

I have clone and tried to run HubSpot.Net.Examples, but there is an error that I cannot solve in HubSpotBaseClient.js file. What is the problem?

27439i49DA7316855E7F1B.PNG

Severity Code Description Project File Line Suppression State
Error CS0019 Operator ‘!=’ cannot be applied to operands of type ‘K’ and ‘default’ HubSpot.NET (net461), HubSpot.NET (netstandard2.0) C:\Users\dke10004\Desktop\HubSpot.NET-master\HubSpot.NET-master\HubSpot.NET\Core\HubSpotBaseClient.cs 114 Active

Severity Code Description Project File Line Suppression State
Error CS0019 Operator ‘!=’ cannot be applied to operands of type ‘T’ and ‘default’ HubSpot.NET (net461), HubSpot.NET (netstandard2.0) C:\Users\dke10004\Desktop\HubSpot.NET-master\HubSpot.NET-master\HubSpot.NET\Core\HubSpotBaseClient.cs 139 Active

Hey @emrehoser,

Digging further into this, I found this stackoverflow discussion: https://stackoverflow.com/questions/8982645/how-to-solve-operator-cannot-be-applied-to-operands-of-type-t-and-t, it state the following:

"T is a type argument and can be a class or a struct, Thus compiler won’t let you perform actions that doesn’t exist in classes and structs.

structs don’t have the == and != by default(but can be added), this is why the compiler complains.

If you use the where keyword to add a constraint to the type argument, the Compiler will let you use that type\interface method\operators

constrain T to be a class"

As such, could you try something like this:

!entity.Equals(default) --> Reference here: CS0019: Operator ‘!=’ cannot be applied to operands of type ‘TEnum’ and ‘TEnum’ where TEnum: Enum · Issue #2025 · dotnet/csharplang

Thank you so much.