I have tried to write code to generate array of unique random integers having no duplicate integer among them, but it is not producing expected result 
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Random r = new Random();
int[] arr = new int[6];
for (int i = 0; i < 6; i++)
{
arr = r.Next(1,7);
}
for (int j = 0; j < 6; j++)
{
for (int k = 0; k < 6; k++)
{
int x = r.Next(1, 10);
if(arr[j] == arr[k]&& x!=arr[k])
{
arr[j] = x;
}
}
}
for (int l = 0; l < 6; l++)
{
Console.Write(arr[l]+" ");
}
Console.WriteLine();
}
}
}

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
Random r = new Random();
int[] arr = new int[6];
for (int i = 0; i < 6; i++)
{
arr = r.Next(1,7);
}
for (int j = 0; j < 6; j++)
{
for (int k = 0; k < 6; k++)
{
int x = r.Next(1, 10);
if(arr[j] == arr[k]&& x!=arr[k])
{
arr[j] = x;
}
}
}
for (int l = 0; l < 6; l++)
{
Console.Write(arr[l]+" ");
}
Console.WriteLine();
}
}
}