try this:
class a
{
int[] cr=new int[10];
public int[] add()
{
cr[0] = 111;
return cr;
}
}
class Program
{
static void Main(string[] args)
{
int[] ar = new int[10];
ar[0] = 55;
a obj = new a();
arr = obj.add();
Console.WriteLine(ar[0]);
}
I did it quick and dirty, but I think it is because br is not coming
out the function. if you want to pass an argument and change it, you need to use the ref or out keyword (see MSDN)
hope this helps.