我需要將以下代碼段中的第4行翻譯爲VB。出於某種原因,我今晚無法完成這件事。我要麼太累了,要麼是人才流失......你能幫忙嗎?將代碼片段從C#轉換爲VB
var provider = new NativeApplicationClient(GoogleAuthenticationServer.Description);
provider.ClientIdentifier = ClientCredentials.ClientID;
provider.ClientSecret = ClientCredentials.ClientSecret;
var auth = new OAuth2Authenticator<NativeApplicationClient>(provider, GetAuthentication);
翻譯工具已經讓我走了這麼遠,但它是不正確的。
Dim provider As NativeApplicationClient = New NativeApplicationClient(GoogleAuthenticationServer.Description)
provider.ClientIdentifier = ClientCredentials.ClientID
provider.ClientSecret = ClientCredentials.ClientSecret
Dim auth As OAuth2Authenticator(Of NativeApplicationClient) = New OAuth2Authenticator(Of NativeApplicationClient)(provider, GetAuthorization)
的GetAuthorization方法具有以下特徵。
Private Function GetAuthorization(ByVal arg As NativeApplicationClient) As IAuthorizationState
我知道我錯過了一些簡單的事情。 :D謝謝! –