title: I need to extract working hour breaks out of a Time Statement List [C# | Vb.Net]
body: <p>I'm working on an API to import Time Statements (basically Excel sheets with working hours etc.) I have successfully read and saved the data in a BindingList(Of MyClass), but now I need to extract the time breaks in this list and put them into another separate list.</p>
  <p>The problem is the hours need to be extracted in a specific way: I basically need the last column value of the first row, and I have to combine it with the penultimate column value of the second row to create a new record in the separate list.</p>
  <p>The records in the separate list are differentiated by the Date.</p>
  <p>I have tried to convert my BindingList to a DataTable to work with the row indices, but I have no idea how or where to start.</p>
  <p>I hope I explained my problem well enough. I have also attached a screenshot with the two list structures and the way it should be handled.</p>
  <p>I am looking forward to your ideas!</p>
  <p><img src="https://i.stack.imgur.com/BrW0T.png" alt="Link to the Image Example" /></p>
  <p>Here is my breaks class, my timestamp class is basically the same without the First Name and Last Name property:</p>
  <pre><code> Public Class BreaksMA
      Implements INotifyPropertyChanged
  
      Private _ID As String
      Public Property ID As String
          Get
              Return _ID
          End Get
          Set(value As String)
              _ID = value
              RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(&quot;ID&quot;))
          End Set
      End Property
  
      Private _Date As String
      Public Property DateX As String
          Get
              Return _Date
          End Get
          Set(value As String)
              _Date = value
              RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(&quot;DateX&quot;))
          End Set
      End Property
  
      Private _From As String
      Public Property From As String
          Get
              Return _From
          End Get
          Set(value As String)
              _From = value
              RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(&quot;From&quot;))
          End Set
      End Property
  
      Private _To As String
      Public Property ToX As String
          Get
              Return _To
          End Get
          Set(value As String)
              _To = value
              RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(&quot;ToX&quot;))
          End Set
      End Property
  
      Public Event PropertyChanged As PropertyChangedEventHandler Implements INotifyPropertyChanged.PropertyChanged
  End Class
  </code></pre>
  <p>Here is my breaks list :</p>
  <pre><code>    Private _breakView As List(Of BreaksMA)
  Public Property breakView As List(Of BreaksMA)
      Get
          Return _breakView
      End Get
      Set(value As List(Of BreaksMA))
          _breakView = value
          RaiseEvent PropertyChanged(Me, New PropertyChangedEventArgs(&quot;breakView&quot;))
      End Set
  End Property
  </code></pre>