为什么第二个if语句返回Public NotInheritable Class METARTAF
Inherits Page
Dim dbpath As String
Dim conn As SQLiteConnection
Public Sub New()
' This call is required by the designer.
InitializeComponent()
'Ubicación de la base de datos
dbpath = Path.Combine(ApplicationData.Current.LocalFolder.Path, "airportsdb.sqlite3")
'Conexión a la base de datos
conn = New SQLiteConnection(New WinRT.SQLitePlatformWinRT(), dbpath)
End Sub
Private Sub AutoSuggestBox_TextChanged(sender As AutoSuggestBox, args As AutoSuggestBoxTextChangedEventArgs)
Dim result = conn.Query(Of airports)("select * from airports where name ").FirstOrDefault()
If args.Reason = AutoSuggestionBoxTextChangeReason.UserInput Then
If sender.Text.Length > 1 Then
sender.ItemsSource = result
End If
Else
sender.ItemsSource = "No results..."
End If
End Sub
?
true