dlr bug
[mcs.git] / tests / test-288.cs
blob80f1f0eec8eba23c74634546c0110f95f6c09054
1 using System;
3 namespace Test
5 public interface IBook
7 string GetItem (int i);
8 string this [int i] { get; }
13 public interface IMovie
15 string GetItem (int i);
16 string this [int i] { get; }
21 public class BookAboutMovie : IBook, IMovie
23 private string title = "";
24 public BookAboutMovie (string title)
26 this.title = title;
31 public string GetItem (int i)
33 return title;
38 public string this [int i]
40 get { return title; }
43 public static int Main ( string [] args)
45 BookAboutMovie jurassicPark = new BookAboutMovie("Jurassic Park");
46 Console.WriteLine ("Book Title : " + jurassicPark.GetItem (2));
47 Console.WriteLine ("Book Title : " + ((IBook)jurassicPark)[2] );
48 return 0;