【发布时间】:2013-02-19 12:48:00
【问题描述】:
我需要使用 Google BigQuery API 查询 Google Big Query 表。我正在使用带有 VB.NET 的 Visual Studio 2012。我在 C# 中找到了一个示例代码,我可以通过使用 C# 在 Visual Studio 2012 中进行细微更改来使其工作。
参考:Google BigQuery with .NET documentation/ samples
我需要 VB.NET 中的代码,所以我将代码转换为 VB.Net,除了以下代码行之外,一切都可以正常编译。
// Get the auth URL in C# that works fine:
IAuthorizationState state = new AuthorizationState(new[] { BigqueryService.Scopes.Bigquery.GetStringValue() });
' Get the auth URL in VB.NET that is giving an error “Type expected” :
Dim state As IAuthorizationState = New AuthorizationState(New () {BigqueryService.Scopes.Bigquery.GetStringValue()})
Visual Studio 为 VB.NET 中的代码提供错误“预期类型”。任何人都知道这行代码在 VB.NET 中的正确语法是什么?
【问题讨论】:
-
您应该发布一些代码示例,并缩小您的答案范围。通常,本网站不欢迎诸如“给我看代码”或“为我写一些代码”之类的问题。表现出一些努力,你会得到回报! :)
标签: vb.net google-api-dotnet-client