AvroRecord.TrySetMember Method (SetMemberBinder, Object)

 
System_CAPS_noteNote

A newer version of HDInsight .NET SDK is available that uses the Azure Resource Manager (ARM) approach. You are encouraged to use the newer ARM-based version of HDInsight .NET SDK going forward. For instructions on how to use the new HDInsight .NET SDK to create a cluster, see Create HDInsight Linux clusters using .NET SDK. For instructions on how to submit jobs using the new .NET SDK and other approaches, see Submit jobs to an HDInsight cluster. The HDInsight SDK reference for the newer version is available at HDInsight .NET SDK Reference.

Indicates a value whether the operation is successful.

Namespace:   Microsoft.Hadoop.Avro
Assembly:  Microsoft.Hadoop.Avro (in Microsoft.Hadoop.Avro.dll)

public override bool TrySetMember(
	SetMemberBinder binder,
	object value
)

Parameters

binder
Type: System.Dynamic.SetMemberBinder

Provides information about the object that called the dynamic operation. The binder.Name property provides the name of the member to which the value is being assigned. For example, for the statement sampleObject.SampleProperty = "Test", where sampleObject is an instance of the class derived from the DynamicObject class, binder.Name returns "SampleProperty". The binder.IgnoreCase property specifies whether the member name is case-sensitive.

value
Type: System.Object

The value to set to the member. For example, for sampleObject.SampleProperty = "Test", where sampleObject is an instance of the class derived from the DynamicObject class, the value is "Test".

Return Value

Type: System.Boolean

true if the operation is successful; otherwise, false. If this method returns false, the run-time binder of the language determines the behavior. (In most cases, a language-specific run-time exception is thrown.).

Exception Condition
ArgumentNullException

Thrown when binder is null.

Provides the implementation for operations that set member values. Classes derived from the DynamicObject class can override this method to specify dynamic behavior for operations such as setting a value for a property.

Return to top
Show: