Parsing CSV string and binding it to listbox
Posted
by Amit Ranjan
on Stack Overflow
See other posts from Stack Overflow
or by Amit Ranjan
Published on 2010-05-19T13:25:58Z
Indexed on
2010/05/19
13:30 UTC
Read the original article
Hit count: 353
vb.net
I have splitted comma separated values in an string array, something like this
str[0] ="210"
str[1] ="abc.pdf"
str[2] = "211"
str[3] = "xyz.docx"
and so on. Please note 0,2,4,6,8 [even positions] are having number and odd positions are having string.
I am having a class Attachmodel
Public Class AttachmentModel
Private _attachmentID As Integer = 0
Private _attachmentPath As String = ""
''' <summary>
''' Get Set Attachment ID
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property AttachmentID() As Integer
Get
Return _attachmentID
End Get
Set(ByVal value As Integer)
_attachmentID = value
End Set
End Property
''' <summary>
''' Get Set Attachment Path
''' </summary>
''' <value></value>
''' <returns></returns>
''' <remarks></remarks>
Public Property AttachmentPath() As String
Get
Return _attachmentPath
End Get
Set(ByVal value As String)
_attachmentPath = value
End Set
End Property
End Class
In the above i want to set the values and bind it to the grid, using List
© Stack Overflow or respective owner