In your code you have not assigned item with any value. Hence it is taking as garbage value.
Update the code as below.
private void button1_Click(object sender, EventArgs e)
{
string[] total_items = new string[50];
int items = 0;
try
{
foreach (ListItem li1 in ch11.CheckedItems)
{
if (li1.Selected == true)
{
total_items[items] = li1.Text;
items++;
}
}
}
}
The best way is to use List of string insted of array of string.
private void button1_Click(object sender, EventArgs e)
{
List<string> lstString = new List<string>();
try
{
foreach (ListItem li1 in ch11.CheckedItems)
{
if (li1.Selected == true)
{
lstString.Add(li1.Text);
}
}
}
catch
{
}
}<pre>
Hope this will help you