Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/vb.net/14.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
用于从大查询中读取数据的VB.Net代码示例_Vb.net_Google Api Dotnet Client - Fatal编程技术网

用于从大查询中读取数据的VB.Net代码示例

用于从大查询中读取数据的VB.Net代码示例,vb.net,google-api-dotnet-client,Vb.net,Google Api Dotnet Client,我需要使用GoogleBigQueryAPI查询GoogleBigQueryTable。我正在使用Visual Studio 2012和VB.NET。我在C#中找到了一个示例代码,我可以在VisualStudio2012中使用C#对其进行一些小的修改 参考: 我需要VB.NET中的代码,因此我将代码转换为VB.NET,除以下代码行外,所有代码都可以正常编译 // Get the auth URL in C# that works fine: IAuthorizationS

我需要使用GoogleBigQueryAPI查询GoogleBigQueryTable。我正在使用Visual Studio 2012和VB.NET。我在C#中找到了一个示例代码,我可以在VisualStudio2012中使用C#对其进行一些小的修改

参考:

我需要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中的代码提供错误“Type expected”。有人知道VB.NET中这行代码的正确语法是什么吗

这正是您的错误所描述的。VB.Net不喜欢推断的数组初始值设定项

Dim state As IAuthorizationState = New AuthorizationState(New () {BigqueryService.S...
应该是

Dim state As IAuthorizationState = New AuthorizationState(New TheTypeOfArrayHere() {BigqueryService.S...

您应该发布一些代码示例,并缩小答案的范围。通常像“给我看代码”或“给我写一些代码”这样的问题在这个网站上是不受欢迎的。付出一些努力,你就会得到回报!:)