# CS0019 error in HubSpot.Net.Examples

**URL:** <https://community.hubspot.com/t/cs0019-error-in-hubspot-net-examples/21258>\
**Category:** APIs & Integrations\
**Tags:** timeline-and-extensions-apis\
**Created:** [May 29, 2020, 11:58am UTC](https://community.hubspot.com/t/cs0019-error-in-hubspot-net-examples/21258 "2020-05-29T11:58:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![emrehoser](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/emrehoser/32/60590_2.png) [@emrehoser](https://community.hubspot.com/u/emrehoser)\
**Post date:** [May 29, 2020, 11:58am UTC](https://community.hubspot.com/t/cs0019-error-in-hubspot-net-examples/21258/1 "2020-05-29T11:58:55Z")

</div>

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](https://d2qpr2jzcazej7.cloudfront.net/original/3X/1/5/155d1cff4c7da9d5edb5a0bf0f940875c3d8e205.png)

Severity Code Description Project File Line Suppression State  
Error CS0019 Operator ‘!=’ cannot be applied to operands of type ‘K’ and ‘default’ [HubSpot.NET](http://HubSpot.NET) (net461), [HubSpot.NET](http://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](http://HubSpot.NET) (net461), [HubSpot.NET](http://HubSpot.NET) (netstandard2.0) C:\Users\dke10004\Desktop\HubSpot.NET-master\HubSpot.NET-master\HubSpot.NET\Core\HubSpotBaseClient.cs 139 Active

---

<div class="post-metadata">

**Author:** ![WendyGoh](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/wendygoh/32/42320_2.png) [@WendyGoh](https://community.hubspot.com/u/WendyGoh)\
**Post date:** [June 1, 2020, 5:41am UTC](https://community.hubspot.com/t/cs0019-error-in-hubspot-net-examples/21258/2 "2020-06-01T05:41:15Z")

</div>

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](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](https://github.com/dotnet/csharplang/issues/2025)

---

<div class="post-metadata">

**Author:** ![emrehoser](https://d10pqhm3lwygmk.cloudfront.net/user_avatar/community.hubspot.com/emrehoser/32/60590_2.png) [@emrehoser](https://community.hubspot.com/u/emrehoser)\
**Post date:** [June 1, 2020, 9:58am UTC](https://community.hubspot.com/t/cs0019-error-in-hubspot-net-examples/21258/3 "2020-06-01T09:58:53Z")

</div>

Thank you so much.
