我努力將下面的代碼轉換爲VB。將C#轉換爲VB。掙扎與(陣列:新[]和關鍵字等待)
C#:
UserCredential credential;
using (var stream = new FileStream(client_Secrets, FileMode.Open, FileAccess.Read))
{
credential = await GoogleWebAuthorizationBroker.AuthorizeAsync(
GoogleClientSecrets.Load(stream).Secrets,
new[] { YouTubeService.Scope.YoutubeUpload },
"user",
CancellationToken.None
);
}
VB:
Using stream = New FileStream(client_Secrets, FileMode.Open, FileAccess.Read)
credential = GoogleWebAuthorizationBroker.AuthorizeAsync(GoogleClientSecrets.Load(stream).Secrets,
New() {YouTubeService.Scope.YoutubeReadonly}, "user", CancellationToken.None, New FileDataStore(Me.[GetType]().ToString()))
End Using
我不得不拋出了等待我只是不能得到陣列工作在()中的藍色線段並說類型預計。這是新()
請注意,我是知道的轉換工具,如: http://www.developerfusion.com/tools/convert/csharp-to-vb/
這些不與Array new()
和關鍵字幫助恭候我已經厭倦了。
的http:// www.developerfusion.com/tools/convert/csharp-to-vb/ – 2014-10-01 15:53:51
@DmitryLedentsov這是我遇到問題的數組,代碼轉換器不會幫助我已經完成了轉換,它只有數組並等待鍵我不確定VB的等價文字 – Pomster 2014-10-01 15:55:08
'New Object(){YouTubeService.Scope.YoutubeReadonly}'? – 2014-10-01 15:55:30