how to find the int reperesenting the index of and item in list?

I need to find out what the int is for the specific items in my list. for example.

List<Question> list = new List<Question>();

    void Awake()
    {
        //Questions and answers are listed here. Index beginning at 0.
        //The CorrectAnswer property should set to the correct
        //Index of the correct answer in this first one you can see
        //Correct answer is index "3". 0, 1, 2, and 3("Four Text").
        list.Add(new Question());
        list[0].QuestionText = "What is 2 + 2?";
        list[0].Answers.Add("One");
        list[0].Answers.Add("Two");
        list[0].Answers.Add("Three");
        list[0].Answers.Add("Four");
        list[0].CorrectAnswer = 3;

        list.Add(new Question());
        list[1].QuestionText = "What is 4 + 4?";
        list[1].Answers.Add("One");
        list[1].Answers.Add("Two");
        list[1].Answers.Add("Eight");
        list[1].Answers.Add("Four");
        list[1].CorrectAnswer = 2;
    }

That is the list. There will be alot more items in the list later on. I am using a forloop to iterate through the answers and check to see if hte answer is right or not.

//Display the answers.
        for (int i = 0; i <= 3; i++ )
        {
            int aNum = 0;
            if (GUILayout.Button(list[index].Answers*))*

{
int answer = list[index].Answers[aNum].IndexOf();
if (list[index].Answers[aNum]. == list[index].CorrectAnswer)
{
}
}
I know this isnt complete because I am stuck on trying to access the int, (0,1,2, or 3) of the int CorrectAnswer. The CorrectAnswer is an int that can be compared to the actual index of the list[0],Answers[0,1,2,or 4]. How can I do this?

Try using: int index = list.IndexOf(ValueInList);. IndexOf returns the int value of an item in the list, and returns null if the item isn’t in the list.

For more info: http://www.dotnetperls.com/list-indexof.