CodePudding user response:
I will only Vb.net, you turn toPublic class info
Public property user as string
Public property password as string
The end of the class
Private Sub readfromtext (TXT as string)
Dim infos as new list (of the info)
Dim sinfo as new info
Dim txtlist=TXT. Split (controlchars. CTRLFT)
For each t in txtlist
Sinfo=new info
Sinfo. User=t.s plit (', ') (0)
Sinfo. Password=t.s plit (', ') (1)
Infos. Add (sinfo)
Next
Datagridview. The datasource=infos
End Sub
Pure hand