I have some Items in a ComboBox. Each Item has an Id and a name.
______________
│_____________▼│
│111 Simon │
│222 Patrick │
│3333 John │
│155555 Ted │
└──────────────┘
I need to pass the Id of the selected item to a stored procedure. I will have to Parse part of the item to get only the Id. My problem is, how can I do this when I don't know the length of the Id. (It can be from 1 to 100 characters).
comboBox1.SelectedText.Split(' ')