//Make a method: void MogelijkePaardenSprongen(int[,] schaakbord, Positie positie) This method determines the possible positions where the Horse can jump (value 2). Of course, you do this in a smart way ( with a LOOP). Please note, there are not always 8 possibilities! The parameter position indicates where the horse is located. Test the methods (call from the Start method like the image below?
// this is the code that i have got for so far,
static void Main(string[] args)
{
Program myProgram = new Program();
myProgram.Start();
Console.ReadKey();
}
void Start()
{
int [,] schaakbord = new int [8, 8];
InitSchaakbord(schaakbord);
ToonSchaakBord(schaakbord);
}
void InitSchaakbord(int[,] schaakbord)
{
int leeg = 0;
int bezet = 1;
int mogelijkbezet = 2;
for (int i=0; i<schaakbord.GetLength(0); i++)
{
for (int j=0; j<schaakbord.GetLength(1); j++)
{
schaakbord[i, j] = leeg;
}
}
}
void ToonSchaakBord(int[,] schaakbord)
{Positie positie = new Positie();
for (int i = 0; i < schaakbord.GetLength(0); i++)
{Plaatspaard(schaakbord);
for (int j = 0; j < schaakbord.GetLength(1); j++)
{
if (schaakbord[i, j] == 0)
{
Console.Write(".");
}
else if (schaakbord[i, j] == 1)
{
Console.ForegroundColor = ConsoleColor.Red;
Console.Write("*");
Console.ResetColor();
}
else if (schaakbord[i, j]==2)
{
Console.ForegroundColor = ConsoleColor.Yellow;
Console.Write("*");
Console.ResetColor();
}
Console.Write(" ");
}
Console.WriteLine();
MogelijkePaardenSprongen(schaakbord, positie);
}
}
Positie Plaatspaard(int [,] schaakbord)
{Positie x = new Positie();
Random rnd = new Random();
x.waarde1 = rnd.Next(1, 8);
x.waarde2 = rnd.Next(1, 8);
for (int i = 0; i<schaakbord.GetLength(0);i++ )
{
for (int j=0; j<schaakbord.GetLength(1); j++)
{
if (x.waarde1 == i && x.waarde2 == j)
schaakbord[i, j] = 1;
}
}
return x;
}
class Positie
{
public int waarde1;
public int waarde2;
}
void MogelijkePaardenSprongen(int[,] schaakbord, Positie positie)
{
for (int i =0; i<schaakbord.GetLength(0); i++)
{
for (int j=0; j<schaakbord.GetLength(1); j++)
{
/// possible horsesteps?
/// call from void start method
if (schaakbord[i, j] == 0)
{
}
}
}

Because its assignment I don't want to give you straight whole solution. Please don't hesitate to comment if you need more help.
My suggestion is to create object
then create collection of them with possible moves
then cycle through collection and check conditions if its possible to move there from 'horse' location .