Hi All
I have a listbox with a list like below
1. 05/7/11
2. 05/07/11
3. 09/8/11
4. 05/11/11
Using the code below that shuld check for a single digit month
string regExp1 = "(?
string arr;
for (int a = 0; a < 99; i++)
{
arr = arrStrUSA[a];
if (arr == regExp1)
{
arr.Insert(4, "0");
listBox2.Items.Add(arr);
}
else
{
listBox2.Items.Add(arr);
}
}
I thought I could iterate through the listbox adding a 0 to the front of the ones with a single digit for a month but nothing comes.
What I need to do is add 0 to line 1, 3 so they look like lines 2, 4
then delete "
Thanks in advance
Mike
1 Answer
Know the answer? Post it. Somebody with the same question will find it here.
Answer a question in the forums and earn +20 SHARP for every answer.
See unanswered questionsTop experts
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
VulpesRank #55 · 29.2K reputationPosted Apr 21, 2012, 4:55 AM EDT
http://www.c-sharpcorner.com/Forums/Thread/169439/trouble-with-lilstbox-and-arrays.aspx