Solved

Splitting a Piped String Help

Posted on 2006-07-19
2
204 Views
Last Modified: 2010-04-16
Hello all.  I have a dropdown that my 0 index has a piped account number like 112121|321333|343242.  I need to somehow loop through and grab each number and then use it in a call.  Can anyone give me help with this.  Its in a SelectedValue
0
Comment
Question by:sbornstein2
2 Comments
 
LVL 18

Accepted Solution

by:
Ravi Singh earned 500 total points
Comment Utility
Hi, use the split method and specify a delimiter, it'll return a string array with each number on a seperate index:

string accountNumbers = this.comboBox1.SelectedValue.ToString(); //get the value
string[] accountNumberArray = accountNumbers.Split('|'); //split it

foreach (string actNum in accountNumberArray) //loop through array
{
     //use actNum here
}
0
 

Author Comment

by:sbornstein2
Comment Utility
thank you so much
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article introduced a TextBox that supports transparent background.   Introduction TextBox is the most widely used control component in GUI design. Most GUI controls do not support transparent background and more or less do not have the…
This article is for Object-Oriented Programming (OOP) beginners. An Interface contains declarations of events, indexers, methods and/or properties. Any class which implements the Interface should provide the concrete implementation for each Inter…
This tutorial demonstrates a quick way of adding group price to multiple Magento products.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

771 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now