EntityCore<TFields>.SetValue Method (Int32, Object, Boolean, Boolean) |
Sets the value of the field with the index specified to the value specified.
Namespace:
SD.LLBLGen.Pro.ORMSupportClasses
Assembly:
SD.LLBLGen.Pro.ORMSupportClasses (in SD.LLBLGen.Pro.ORMSupportClasses.dll) Version: 5.8.0.0 (5.8.21.0111)
Syntaxprotected bool SetValue(
int fieldIndex,
Object value,
bool performDesyncForFKFields,
bool checkForRefetch
)
Protected Function SetValue (
fieldIndex As Integer,
value As Object,
performDesyncForFKFields As Boolean,
checkForRefetch As Boolean
) As Boolean
Parameters
- fieldIndex
- Type: System.Int32
The fieldindex of the field which value to set. - value
- Type: System.Object
The value to set the field's currentvalue to. - performDesyncForFKFields
- Type: System.Boolean
if set to true, it will call into the desync method if the field with the index passed in is an FK field. - checkForRefetch
- Type: System.Boolean
If set to true, it will check if this entity is out of sync and will refetch it first if it is. Use true in normal
behavior, false for framework specific code.
Return Value
Type:
Booleantrue if the value is actually set, false otherwise
ExceptionsException | Condition |
---|
ArgumentOutOfRangeException | When fieldIndex is smaller than 0 or bigger than the amount of fields in the fields collection. |
See Also