Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2004-09-02 23:14:30 +0400
committerMarek Safar <marek.safar@gmail.com>2004-09-02 23:14:30 +0400
commit2653a50304b04b52ce863344bd01818079399107 (patch)
treef87edcc1c26ff743207bd82e5f59c224ac73f9e8 /mcs/tests/test-288.cs
parent9385bcd34f7fb7e4830753b39c46b6fac789618f (diff)
2004-09-02 Marek Safar <marek.safar@seznam.cz>
* test-288.cs: New test for #62342. svn path=/trunk/mcs/; revision=33241
Diffstat (limited to 'mcs/tests/test-288.cs')
-rw-r--r--mcs/tests/test-288.cs51
1 files changed, 51 insertions, 0 deletions
diff --git a/mcs/tests/test-288.cs b/mcs/tests/test-288.cs
new file mode 100644
index 00000000000..80f1f0eec8e
--- /dev/null
+++ b/mcs/tests/test-288.cs
@@ -0,0 +1,51 @@
+using System;
+
+namespace Test
+{
+ public interface IBook
+ {
+ string GetItem (int i);
+ string this [int i] { get; }
+ }
+
+
+
+ public interface IMovie
+ {
+ string GetItem (int i);
+ string this [int i] { get; }
+ }
+
+
+
+ public class BookAboutMovie : IBook, IMovie
+ {
+ private string title = "";
+ public BookAboutMovie (string title)
+ {
+ this.title = title;
+ }
+
+
+
+ public string GetItem (int i)
+ {
+ return title;
+ }
+
+
+
+ public string this [int i]
+ {
+ get { return title; }
+ }
+
+ public static int Main ( string [] args)
+ {
+ BookAboutMovie jurassicPark = new BookAboutMovie("Jurassic Park");
+ Console.WriteLine ("Book Title : " + jurassicPark.GetItem (2));
+ Console.WriteLine ("Book Title : " + ((IBook)jurassicPark)[2] );
+ return 0;
+ }
+ }
+}