ObjectParameter::Value Property

 

Gets or sets the parameter value.

Namespace:   System.Data.Objects
Assembly:  System.Data.Entity (in System.Data.Entity.dll)

public:
property Object^ Value {
	Object^ get();
	void set(Object^ value);
}

Property Value

Type: System::Object^

The parameter value.

After the query has been compiled, the value cannot be changed. For more information, see Query Builder Methods.

If the new value is incompatible with the type declared in the constructor, it might cause a run-time exception. The provider must determine whether the value is compatible with the declared type. For example, if the initial type is Int32 and the new value is Guid, you might receive an exception.

The example in this topic is based on the AdventureWorks Sales Model. The example adds new parameters to the collection. It iterates through the ObjectParameterCollection and displays the name, the type and the value of each parameter in the collection.

No code example is currently available or this language may not be supported.

.NET Framework
Available since 3.5
Return to top
Show: