有人见过这个吗?
Public Shared Function IsAvailableByCampaignId(ByVal cn As SqlConnection, ByVal tr As SqlTransaction, ByVal campaignId As Integer, ByRef dest As PricingThresholds) As Boolean
Dim retObj = ItemTypes.PricingThresholds.GetThresholds(cn, tr, campaignId)
If retObj IsNot Nothing Then
dest = New PricingThresholds(retObj)
End If
Dim retVal As Boolean = retObj IsNot Nothing
Return retVal
End Function
当我打电话给内在
Dim retObj = ItemTypes.PricingThresholds.GetThresholds(cn, tr, campaignId)
我得到一个非 null 或什么都没有的 retObj,但随后我用它来构建一个新的 PricingThresholds,这是我需要返回的正确类型,并且成功创建了一个有效的返回类型对象,但我从外部返回调用传递的参数 destByRef
没有任何值,并且是空值或空值。
这就像VB不工作。
我想我可以换一种方式退货。