Reputation: 465
I am attempting some experiments using the code samples provided near the bottom of the page
Below are extracts of my VB.NET code based on the link above. Somewhere in the translation I'm missing what is going on here:
Dim auth = New OAuth2Authenticator(Of NativeApplicationClient)(provider, GetAuthorization)
The GetAuthorization method has a signature:
GetAuthorization(arg As NativeApplicationClient)
I am clearly missing something very obvious about the syntax translation between C# and VB.NET, because there is no parameter supplied at the method call in the C# version on the link I supplied.
Upvotes: 0
Views: 909
Reputation: 1851
You must specify the AddressOf
parameter to reference a method.
Dim auth = New OAuth2Authenticator(Of NativeApplicationClient)(provider, AddressOf GetAuthorization)
Upvotes: 3