NewBuilderWithClone Method
NewBuilderWithClone()
Creates a new GenericRecordBuilder for this record's schema, with all the fields copied from this record.
Declaration
IGenericRecordBuilder NewBuilderWithClone()
Returns
IGenericRecordBuilder | A new GenericRecordBuilder. |
Remarks
This method produces an exact copy of this generic record, which can then be updated.
Examples
// this requires you to specify all properties var rec2 = rec1.NewBuilder() .SetBoolean("field-bool", true) .SetInt32("field-int", 1234) .Build();
// this allows you to only specify the modified properties var rec3 = rec1.NewBuilderWithClone() .SetInt32("field-int", 1234) .Build();