Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <pre><code> Dim persSeparator as string=";" Dim keyValSeparator as string="="; Dim allPersons As New Dictionary(Of String, Person) Dim str As String = "Name=Fred;Birthday=19-June-1906;ID=12345" Dim parts As New List(Of String)(str.Split(persSeparator.ToCharArray)) 'why dont want you to split this string?? Dim person As New Person For Each part As String In parts Dim keyValue() As String = part.Split(keyValSeparator.toCharArray()) Select Case keyValue(0).ToUpper Case "ID" person.ID = keyValue(1) Case "NAME" person.Name = keyValue(1) Case "BIRTHDAY" person.BirthDay= keyValue(1) End Select Next If Not allPersons.ContainsKey(person.ID) Then allPersons.Add(person.ID, person) End If Public Class Person Private _name As String Private _birthday As String Private _id As String = String.Empty Public Sub New() End Sub Public Sub New(ByVal id As String) Me._id = id End Sub Public Sub New(ByVal id As String, ByVal name As String) Me._id = id Me._name = name End Sub Public Sub New(ByVal id As String, ByVal name As String, ByVal birthday As String) Me._id = id Me._name = name Me._birthday = birthday End Sub Public Property ID() As String Get Return Me._id End Get Set(ByVal value As String) Me._id = value End Set End Property Public Property Name() As String Get Return Me._name End Get Set(ByVal value As String) Me._name = value End Set End Property Public Property BirthDay() As String Get Return Me._birthday End Get Set(ByVal value As String) Me._birthday = value End Set End Property Public Overrides Function Equals(ByVal obj As Object) As Boolean If TypeOf obj Is Person AndAlso Not obj Is Nothing Then Return String.Compare(Me._id, DirectCast(obj, Person).ID) = 0 Else : Return False End If End Function 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. 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