SqlMethodAttribute::InvokeIfReceiverIsNull Property

 

Indicates whether SQL Server should invoke the method on null instances.

Namespace:   Microsoft.SqlServer.Server
Assembly:  System.Data (in System.Data.dll)

public:
property bool InvokeIfReceiverIsNull {
	bool get();
	void set(bool value);
}

Property Value

Type: System::Boolean

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.

The default value for 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 default constructor for the type.

.NET Framework
Available since 2.0
Return to top
Show: