Click here to Skip to main content
15,895,777 members
Articles / Programming Languages / XML

Validating data with Flat File Checker

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
30 Oct 2009GPL32 min read 43.8K   881   17  
An article on data validation with a flat file schema generated in Flat File Checker.
''' <summary>
''' Represents the collection of row numbers in the file.
''' </summary>
''' <remarks></remarks>
Public Class RecordsCollection
    Implements IEnumerable(Of Integer)
    Private _records As ICollection(Of Integer)

    Public Sub New(ByVal row As Integer)
        _records = New List(Of Integer)
        _records.Add(row)
    End Sub
    Public Sub AddRow(ByVal row As Integer)
        If _records Is Nothing Then _records = New List(Of Integer)
        _records.Add(row)
    End Sub
    Public ReadOnly Property Count() As Integer
        Get
            Return _records.Count
        End Get
    End Property
    Public Function GetEnumerator() As System.Collections.Generic.IEnumerator(Of Integer) Implements System.Collections.Generic.IEnumerable(Of Integer).GetEnumerator
        Return Me._records.GetEnumerator
    End Function

    Public Function GetEnumerator1() As System.Collections.IEnumerator Implements System.Collections.IEnumerable.GetEnumerator
        Return Me._records.GetEnumerator
    End Function
End Class

By viewing downloads associated with this article you agree to the Terms of Service and the article's licence.

If a file you wish to view isn't highlighted, and is a text file (not binary), please let us know and we'll add colourisation support for it.

License

This article, along with any associated source code and files, is licensed under The GNU General Public License (GPLv3)


Written By
Database Developer
United Kingdom United Kingdom
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions