Skip to content
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

Delegate Method error #9

Closed
90301 opened this issue Jun 6, 2017 · 2 comments
Closed

Delegate Method error #9

90301 opened this issue Jun 6, 2017 · 2 comments
Assignees

Comments

@90301
Copy link
Owner

90301 commented Jun 6, 2017

I'm trying to set this static delegate method that will be called every time a "SELECT" Statement is fired off. It seems to be giving me an error, so I suppose I have the syntax wrong or something.

image

Inspired By:
https://stackoverflow.com/questions/7367152/dynamically-assign-method-method-as-variable

@forember
Copy link
Collaborator

forember commented Jun 6, 2017

You need to set the variable to a delegate implementation, not the delegate type.

Example:

public static DataTable MyImplementation(String query) {
    // Best implementation ever...
    return null;
}
// ...
QueryHolder.howDoISelect = MyImplementation;

@forember forember closed this as completed Jun 6, 2017
@forember
Copy link
Collaborator

forember commented Jun 6, 2017

Closed: simply a mistype.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants