I have to remove the empty li from the output.
My Output is like this.
Audit Process Optimization:
My function is like this-
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 questions
DevSocialUpcoming · 3rd editionAI Agents ConferenceDec 1–3, 2026Live onlineFree to attend4days leftRegister
Posted Oct 17, 2013, 8:12 PM EDT
try bellow code
int count = listBox2.Items.Count;
for (int i = count - 1; i >= 0; i--)
{
if (listBox2.Items[i].ToString() == " ")
listBox2.Items.RemoveAt(i);
}
Jignesh TrivediRank #16 · 50.3K reputationPosted Oct 17, 2013, 8:31 PM EDT
agree with kailash...just timing the content list box item.
int count = listBox2.Items.Count;
for (int i = count - 1; i >= 0; i--)
{
if (listBox2.Items[i].ToString().Trim() == "")
listBox2.Items.RemoveAt(i);
}
hope this will help you.