ByRef 取值 sample
Dim teacher As bean = Nothing
If GetSomeThing(ID, teacher) = False Then
ret_ResultMsg = $"Teacher不存在"
Return False
Else
Public gdicCarrier As New ConcurrentDictionary(Of String, bean)
Public Function GetSomeThing(ByVal id As String,
Optional ByRef RetObj As bean = Nothing) As Boolean
Try
Dim key As String = bean.Get_Combination_Key(id)
Dim obj As bean
If gdicCarrier.ContainsKey(key) Then
obj = gdicCarrier.Item(key)
RetObj = obj
Return True
End If
Return False
Catch ex As Exception
Return False
End Try
End Function
留言
張貼留言