這是在.net SDK中提供的代碼示例: Private Sub ReadOrderData(ByVal connectionString As String)
Dim queryString As String = _
"SELECT OrderID, CustomerID FROM dbo.Orders;"
Using connection As New Sq
Public Class View
Public Property Items As String() = {"One", "Two", "Three"}
Public Property Index As Integer = 0
End Class
它的實例設置爲這個XAML中的DataContext: <Window>
<StackPanel>
<
假設我有一個數組或任何其他集合類物質和返回它像以下屬性: public class Foo
{
public IList<Bar> Bars{get;set;}
}
現在,我可以寫這樣的事: public Bar Bar[int index]
{
get
{
//usual null and length check on Bars omitte