DataSetValue Method

Assigns a value to a field based on the column type.

Definition

Namespace: Aliquo.Core
Assembly: Aliquo.Core (in Aliquo.Core.dll) Version: 5.0.9179.22651
C#
public static void SetValue(
	DataRow data,
	string field,
	Object value,
	bool emptyIsNull = true,
	CutTypeString cutString = CutTypeString.Right,
	bool allowInReadOnly = false
)

Parameters

data  DataRow
DataRow where the value will be assigned.
field  String
Field where the value will be set.
value  Object
Value to assign.
emptyIsNull  Boolean  (Optional)
If the field is of type String then it can be set to if it is empty.
cutString  CutTypeString  (Optional)
If the field is of type String then you can indicate that it be cut if the size is exceeded.
allowInReadOnly  Boolean  (Optional)
Indicates whether it can be set to a read-only column.

See Also