How do I get a value from a listbox instead of a textbox, my code is as follows

I’m trying to make a program that shows the prime numbers of the numbers added to the listbox from the textbox and then written in the listbox, with a message box, can anyone help me, where am I wrong?

private void button2_Click(object sender, EventArgs e)

` int deneme = 0;
int sayilarim = Convert.ToInt32(textBox1.Text);

                for (int i = 2; i < sayilarim; i++)
                {
                    if (sayilarim % i == 0)
                        deneme++;
                }
                if (deneme != 0)
                {                       listBox1.Items.Add(textBox1.Text + " Asal Sayi değildir.");
                    MessageBox.Show("Bu Bir Asal Sayi Değildir.");
                }
                else
                {
                    listBox1.Items.Add(textBox1.Text + " sayidir.");
                    MessageBox.Show("Bu Bir Asal Sayi.");
                }
                textBox1.Clear();
            }                MessageBox.Show(listBox1.Items.Count.ToString() + " Adet asal sayı var.");`