How do I find out if a column exists in a VB.Net DataRow

后端 未结 4 1014
暖寄归人
暖寄归人 2021-02-01 00:44

I am reading an XML file into a DataSet and need to get the data out of the DataSet. Since it is a user-editable config file the fields may or may not be there. To handle missin

4条回答
  •  被撕碎了的回忆
    2021-02-01 01:26

    DataRow's are nice in the way that they have their underlying table linked to them. With the underlying table you can verify that a specific row has a specific column in it.

        If DataRow.Table.Columns.Contains("column") Then
            MsgBox("YAY")
        End If
    

提交回复
热议问题