Possible Duplicate:
Why do I get “cannot be accessed with an instance reference” when using teststring.Join but not teststring.Split? (c#)
I am not sure what is wrong with the code. I tried googling but didn't got relevant info.
This is my for loop.
for (int i = 0; i < 5; i++)
{
for (int j = 0; j < 5; j++)
{
slide.Move(s, i, j); // this is the problem.
}
}
and this is my move function. According to me I think I'm calling the function the way it is suppose to but I am not able to figure out what is wrong. I am fairly new the language.
protected static void Move(string s, int x, int y)
{
Console.WriteLine("I am in Move function");
try
{
Console.SetCursorPosition(origCol + x, origRow + y);
Console.Write(s);
}
catch (ArgumentOutOfRangeException e)
{
Console.Clear();
Console.WriteLine(e.Message);
}
for (int i = 0; i < DEFAULT_SIZE; ++i)
{
for (int j = 0; j < DEFAULT_SIZE; ++j)
{
Console.Write("#");
Console.Write("\r{0}% ", i,j);
//Console.WriteLine(slider[i, j]);
}
Console.WriteLine();
Console.ReadKey();
}
}