vb中的语法错误

时间:2014-11-17 02:50:22

标签: vb.net

' Load data for the ViewModel Items
Protected Overrides Sub OnNavigatedTo(e As NavigationEventArgs)
    Using (StudentContext c = New StudentContext(StudentContext.ConnectionString))
        c.CreateIfNotExists()
        c.LogDebug = True
        MainLongListSelector.ItemsSource = c.Students.ToList()
    End Using
End Sub

我有错误')' expects and in line 3 on "c"。怎么办呢?谢谢

1 个答案:

答案 0 :(得分:2)

您在VB .NET中使用C#语法。

尝试

Using c as StudentContext = New StudentContext(StudentContext.ConnectionString)