标签:遍历
Public Sub UpdateBasicData(enBasicData As Entity.BasicDataEntity) Dim i As Integer Dim oldValue As String Dim newValue As String Dim pi As System.Reflection.PropertyInfo Dim mpi() As System.Reflection.PropertyInfo mpi = GetType(Entity.BasicDataEntity).GetProperties() For i = 0 To mpi.Length - 3 pi = mpi(i) oldValue = pi.GetValue(NewBasicDataEntity, Nothing).ToString() newValue = pi.GetValue(enBasicData, Nothing).ToString() If oldValue <> newValue Then Exit For End If Next If i = mpi.Length - 2 Then Throw New BasicDataNotEdit End If BasicDataBLL.EditBasicData(enBasicData) End Sub
<img src="http://img.blog.csdn.net/20150517220906917?watermark/2/text/aHR0cDovL2Jsb2cuY3Nkbi5uZXQvY3hsMDkyMQ==/font/5a6L5L2T/fontsize/400/fill/I0JBQkFCMA==/dissolve/70/gravity/SouthEast" alt="" />
标签:遍历
原文地址:http://blog.csdn.net/cxl0921/article/details/45798257