2014-11-17 63 views
-6
' 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"。如何處理這個?謝謝vb中的語法錯誤

+4

你混合VB .NET的語法和C#。你的問題被標記爲C#,但語法是VB .NET –

+0

這絕對不是C#。 – grovesNL

回答

2

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

嘗試

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