Unity3D C# Random Int Generator
<p>I have used C++ for a long time. Now, I just started working with C# in Unity3D. I'm almost complete at finishing an app but I can't seem to find a working int generator in Unity C# (With Min and Max values).
I've tried the following:</p>

<pre><code>r = Random.Range(min, max)
</code></pre>

<p>and</p>

<pre><code>Random rand = new Random();
r = rand.next(min, max)
</code></pre>

<p>Both didn't work. I know in C++ you use:</p>

<pre><code>r = rand() % max + min;
</code></pre>

<p>If you want a random number. But what is the case with Unity C#?
Code:</p>

<p><strong>EDIT</strong>:</p>

<pre><code>using UnityEngine;
using System.Collections;

public class STarget : MonoBehaviour {
public GameObject inter;
int rand;
public GameObject TS1;
public GameObject TS2;
public GameObject TS3;
public GameObject TS4;
public GameObject TS5;
void Update () {
    rand = Random.Range(1, 6);
}
public void GameRun () {
    switch (rand){
        case 1:
            inter = TS1;
            break;
        case 2:
            inter = TS2;
            break;
        case 3:
            inter = TS3;
            break;
        case 4:
            inter = TS4;
            break;
        case 5:
            inter = TS5;
            break;
    }
    Game.TargetSingle(inter);
    }
}
</code></pre>