using System;
public class SomeClass
{
private int[] nums;
public SomeClass(int i)
{
nums = new int[10];
nums[0] = i;
}
public int[] Nums
{
get { return nums; }
set { nums = value; }
}
}
public class MainClass
{
public static void Main(string[] args)
{
SomeClass sc = new SomeClass(42);
Console.WriteLine("{0}", sc.Nums[0]);
sc.Nums[0] = sc.Nums[0] + 5;
Console.WriteLine("{0}", sc.Nums[0]);
}
}
|