Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>Part of your problem is that vb8 does not yet support some of the features your C# code is using (automatic properties and collection initializers, for example), so the translations is not 1:1. Some of these features were added in VB9. That said, it's not that hard:</p> <pre><code>Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Dim tests As New List(Of CaclulatedData)(2) tests.Add(New CalculatedData()) tests(0).Bonds = "First Bond" tests(0).TransactionList.Add(New TransactionData()) tests(0).TransactionList(0).Debit = "DebitData" tests.Add(New CalculatedData()) tests(1).Bonds = "Second Bond" tests(1).TransactionList.Add(New TransactionData()) tests(1).TransactionList(0).Debit = "123123" tests(1).TransactionList.Add(New TransactionData()) tests(1).TransactionList(1).Debit = "12312" tests(1).TransactionList(1).Credit = "3453" gridControl1.DataSource = tests End Sub Public Class JEString Private _Bonds As String Public Property Bonds() As String Get Return _Bonds End Get Set(ByVal value As String) _Bonds = value End Set End Property End Class Public Class CaclulatedData Inherits JEString Private _TransactionList As New List(Of TransactionData)() Public ReadOnly Property TransactionList() As List(Of TransactionData) Get Return _TransactionList End Get End Property End Class Public Class TransactionData Private _Debit As String Private _Credit As String Public Property Debit() As String Get Return _ Debit End Get Set(ByVal value As String) _ Debit = value End Set End Property Public Property Credit() As String Get Return _ Credit End Get Set(ByVal value As String) _Credit = value End Set End Property End Class </code></pre>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload