Dim dsProducts As New DataSet()
dsProducts.ReadXml("productlist.xml")
Dim dvProducts As New DataView(dsProducts.Tables("Products"))
dvProducts.Sort = "SKU"
Dim rowIndex As Integer = dvProducts.Find("1")
Dim Price As String, Description As String
If rowIndex = -1 Then
' The SKU was not found in our data
Console.WriteLine("Product Not found")
Else
Price = dvProducts(rowIndex)("Price").ToString()
Console.WriteLine("Price: " & Price)
' Price: 100.00
Description = dvProducts(rowIndex)("Description").ToString()
' Description: Widget #1
Console.WriteLine("Description: " & Description)
End If
Date :
2011-08-05 12:58:41
By :
webmaster
No. 2
Guest
ขอบคุณครับ !!!
รบกวนช่วยอธิบายหน่อยได้ไม่ครับ
dvProducts.Sort = "SKU"
Dim rowIndex As Integer = dvProducts.Find("1")
มันทำงานอย่างไงครับ SKU คือ? ครับ