EntitySetFieldType(Field, FieldType, Forge |
Exception | Condition |
---|---|
ArgumentNullException | A non-optional argument was NULL |
InvalidOperationException | The Field belongs to a different Schema from this Entity, or this Entity is invalid. |
ArgumentException | Requested type does not match the field type. |
ArgumentException | The unitTypeId value is not compatible with the field description. |
ArgumentException | This field's subschema prevents writing. |
ArgumentException | Invalid floating-point value. |
The template parameter must match the type of the field (specified when creating the Schema) exactly; this method does not perform data type conversions. The types for containers are IList for arrays and IDictionary for maps.
This method only modifies your copy of the Entity. Store the Entity in an element or another Entity to save the new value. Write access check is not performed on each call to Set. Instead, write access is checked when you try to save the Entity in an Element or another Entity.