SqlMethodAttribute.InvokeIfReceiverIsNull Property
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Indicates whether SQL Server should invoke the method on null instances.
public:
property bool InvokeIfReceiverIsNull { bool get(); void set(bool value); };
public bool InvokeIfReceiverIsNull { get; set; }
member this.InvokeIfReceiverIsNull : bool with get, set
Public Property InvokeIfReceiverIsNull As Boolean
Property Value
true
if SQL Server should invoke the method on null instances; otherwise, false
. If the method cannot be invoked (because of an attribute on the method), the SQL Server DbNull
is returned.
Remarks
The default value of the InvokeIfReceiverIsNull
property is false
. That is, the method is not invoked on a null instance. If InvokeIfReceiverIsNull
is true
, the return value of the method depends upon its type. If the return type of the method is nullable, the distinguished null value for the type is returned. If the return type is non-nullable, the default CLR value for the type is returned. The default value for reference types is null
. The default value for a value type is the value that is returned when you call the parameterless constructor for the type.