Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ CheckMaxLength() [1/2]

bool System.Data.DataColumn.CheckMaxLength ( )
inlinepackage

Definition at line 1248 of file DataColumn.cs.

1249 {
1250 if (0 <= _maxLength && Table != null && 0 < Table.Rows.Count)
1251 {
1252 foreach (DataRow row in Table.Rows)
1253 {
1254 if (row.HasVersion(DataRowVersion.Current) && _maxLength < GetStringLength(row.GetCurrentRecordNo()))
1255 {
1256 return false;
1257 }
1258 }
1259 }
1260 return true;
1261 }
int GetStringLength(int record)
DataRowCollection Rows
Definition DataTable.cs:701

References System.Data.DataColumn._maxLength, System.Data.DataRowCollection.Count, System.Data.DataColumn.GetStringLength(), System.Data.DataTable.Rows, and System.Data.DataColumn.Table.

Referenced by System.Data.DataColumn.CheckColumnConstraint().