System.Data.DataError.Clear C# (CSharp) Method

Clear() private method

private Clear ( ) : void
return void
        internal void Clear()
        {
            for (int i = 0; i < _count; i++)
            {
                _errorList[i]._column._errors--;
                Debug.Assert(_errorList[i]._column._errors >= 0, "missing error counts");
            }
            _count = 0;
            _rowError = string.Empty;
        }

Same methods

DataError::Clear ( DataColumn column ) : void

Usage Example

Example #1
0
 /// <include file='doc\DataRow.uex' path='docs/doc[@for="DataRow.ClearErrors"]/*' />
 /// <devdoc>
 /// <para> Clears the errors for the row, including the <see cref='System.Data.DataRow.RowError'/>
 /// and errors set with <see cref='System.Data.DataRow.SetColumnError'/>
 /// .</para>
 /// </devdoc>
 public void ClearErrors()
 {
     if (error != null)
     {
         error.Clear();
     }
 }