indexers-abc/1/b.cs - A client of A which uses the indexer of A. | Lecture 5 - slide 13 : 29 Program 2 |
using System; class B { public static void Main(){ A a = new A(5); double d; a[1] = 6; a[2] = 7.0; a[3] = 8.0; d = a[1] + a[2]; Console.WriteLine("a: {0}, d: {1}", a, d); } }