how do you create a random number in unity(c#)

i want to be able to create a random number in c#.I am new to the programming language.
What is wrong with this code?

using UnityEngine;
using System.Collections;

public class randomnumbertest1 : MonoBehaviour {

    // Use this for initialization
    void Start () {

    }
   
    // Update is called once per frame
    void Update () {
   
    }
    void Rand() {
        Random rnd = new Random();
        int num = rnd.Next(1,6);
        Debug.Log (num);
    }
}

The Random class has what you need. You don’t need to create an instance, the functions are static.

int num = Random.Range(1,6);

thanks