diff --git a/DDUserManager/DDUserManager/ModuleRuntime.vb b/DDUserManager/DDUserManager/ModuleRuntime.vb index 22e868d..220705e 100644 --- a/DDUserManager/DDUserManager/ModuleRuntime.vb +++ b/DDUserManager/DDUserManager/ModuleRuntime.vb @@ -9,12 +9,12 @@ Module ModuleRuntime Public Function SaveMySettingsValue(name As String, value As String, type As String) Try - Dim DT As DataTable + Dim DT As DataTable = Nothing If type = "ConfigMain" Then DT = GetTablefromXML(ConfigPath) End If - If Not DT Is Nothing Then + If Not IsNothing(DT) Then For Each Row As DataRow In DT.Rows If Row.Item("ConfigName") = name Then Row.Item("Value") = value @@ -34,7 +34,7 @@ Module ModuleRuntime End Function - Private Function GetTablefromXML(path As String) + Private Function GetTablefromXML(path As String) As DataTable Try Dim DS As New DataSet DS.ReadXml(path)