Randome Number for Dice

I'm working on an easy dice roll. All it is is getting a random number from the code and it will display on the screen the two numbers. I'm having trouble though. It is in C#

using UnityEngine;
using System.Collections;

public class Dice : MonoBehaviour {

    public int dice1;
    public int dice2;

private void RandomNumber()
    {
        //Get a random number for the dice.
        Random RandomNumber = new Random();
        dice1 = RandomNumber.Next(6);
        //Show Dice 1
        Debug.Log(dice1);
        dice2 = RandomNumber.Next(6);
        //Show Dice 2
        Debug.Log(dice2);

    }
}

.Next is underlined and it wont compile. Any suggestions on how to fix this?

It's because you're using unitys Random class and not the .net/monos Random class. I am not sure which you want to use but I think simplest is to use unitys:

using UnityEngine;
using System.Collections;

public class Dice : MonoBehaviour 
{
    public int dice1;
    public int dice2;

    private void RandomNumber()
    {
        dice1 = Random.Range(0, 7);
        Debug.Log(dice1);

        dice2 = Random.Range(0, 7);
        Debug.Log(dice2);
    }
}

If you want to use Random from .NET, either import the System namespace, or use System.Random to differentiate it from UnityEngine.Random.