首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >视觉基本误差

视觉基本误差
EN

Stack Overflow用户
提问于 2013-11-05 17:58:14
回答 2查看 82关注 0票数 0

I‘在第15行“预期语句的结尾”处出现错误

我做错了什么?就连班里的神童也说这应该管用,就像这样:

代码语言:javascript
复制
Public Class Form1

Private Sub btnShow_Click(sender As Object, e As EventArgs) Handles btnShow.Click
    Dim states() As String = IO.File.ReadAllLines("USStates.txt")  ' makes array
    Dim data = From state In states
    Let line = state.Split(","c)
    Let Name = line(0)
    Let stateAb = line(1)
    Let area = CInt(line(2))
    Let census = CDbl(line(3))
    Order By Name Ascending
    ' query
    Select name,stateAb,area,census

*在这里获取错误*

代码语言:javascript
复制
    dgvOut.DataSource = data.ToList
    dgvOut.CurrentCell = Nothing
    dgvOut.Columns("Name").HeaderText = "State Name"
    dgvOut.Columns("ststeAb").HeaderText = "Abbreviation"
    dgvOut.Columns("area").HeaderText = "Area In Sq. Miles"
    dgvOut.Columns("census").HeaderText = "Population"
End Sub
End Class
EN

回答 2

Stack Overflow用户

回答已采纳

发布于 2013-11-05 18:09:10

删除' query -你不能在那里放评论。

票数 2
EN

Stack Overflow用户

发布于 2013-11-05 18:10:09

用行连续来尝试它:

代码语言:javascript
复制
Dim data = From state In states _
Let line = state.Split(","c) _
Let Name = line(0) _
Let stateAb = line(1) _
Let area = CInt(line(2)) _
Let census = CDbl(line(3)) _
Order By Name Ascending _
Select name, stateAb, area, census
票数 1
EN
页面原文内容由Stack Overflow提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://stackoverflow.com/questions/19795606

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档