Skip to content

"Cannot invoke a non-delegate type" error when using underscore method #322

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
RaceProUK opened this issue Sep 20, 2016 · 2 comments
Closed
Labels
type: question question directed at the library

Comments

@RaceProUK
Copy link

When calling sg.client.contactdb.lists._(listId), I'm getting an exception with the message "Cannot invoke a non-delegate type".
I'm using the same syntax as shown int he example code (https://github.com/sendgrid/sendgrid-csharp/blob/master/examples/contactdb/contactdb.cs).

How can I resolve this error?

  • sendgrid-csharp Version: 8.0.4
  • .NET Version: 4.6.1

I'm able to use other parts of the SendGrid library without issue with .NET 4.6.1; it's only the underscore method that's not working.

@RaceProUK
Copy link
Author

Solved the problem: turns out listId has to be a string, something that is missing from the documentation, not shown through IntelliSense because of everything being dynamic, and also seemingly unrelated to the exception thrown.

@thinkingserious
Copy link
Contributor

Hey @RaceProUK,

Thanks for letting us know how you solved it. That issue should be fixed with this is complete: #303. If you have not already, I'd appreciate if you gave a plus 1 to that thread to help bump it's priority.

Also, pleas shoot us an email at [email protected] with your mailing address and T-shirt size :)

@thinkingserious thinkingserious added the type: question question directed at the library label Sep 22, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: question question directed at the library
Projects
None yet
Development

No branches or pull requests

2 participants