Q:

Check if an element is included in two different arrays

I'm trying to create a simple calculator to show which of the ints are included in two arrays,all of which numbers are typed by the user. How do i get the full number because I think when i do foreach loop its reading the numbers like for example 49 it reads it as 4 and 9 not 49?How do I solve this problem?Also where am I mistaken? 
string firstTextBox = ConjTextBox. Text;
string secondTextBox = DisjTextBox. Text;
int intsInFirstTextBox;
int intsInSecondTextBox;
List<int> ListOfInts = new List<int>();
try
{
    foreach (char c in firstTextBox)
    {
        intsInFirstTextBox = Convert. ToInt32(c);
        foreach (char q in secondTextBox)
        {
            intsInSecondTextBox = Convert. ToInt32(q);

            if (intsInFirstTextBox == intsInSecondTextBox)
            {
                ListOfInts. Add(intsInFirstTextBox);
                ListOfInts. Sort();
            }
        }
    }
    foreach (int i in ListOfInts)
    {
        resultTextBox. Text += i.ToString();
    }
}
catch (Exception Error)
{
    resultTextBox. Text = Error. Message;
}

A:

char separator=',';
int temp=-1;
var list1=firstTextBox. Split(new char[]{separator})
                      .Where(n=>int. TryParse(n,out temp))
                      .Select(n=>temp);
var list2=secondTextBox. Split(new char[]{separator})
                      .Where(n=>int. TryParse(n,out temp))
                      .Select(n=>temp);
var common=list1.Intersect(list2);

