' 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"
。怎么办呢?谢谢
答案 0 :(得分:2)
您在VB .NET中使用C#语法。
尝试
Using c as StudentContext = New StudentContext(StudentContext.ConnectionString)