浏览代码

Add

svn path=/trunk/mcs/; revision=2547
Ravi Pratap M 24 年之前
父节点
当前提交
fddbeaf8cd
共有 1 个文件被更改,包括 34 次插入0 次删除
  1. 34 0
      mcs/errors/cs0239.cs

+ 34 - 0
mcs/errors/cs0239.cs

@@ -0,0 +1,34 @@
+// cs0239.cs : `X.MyMethod' : cannot override inherited member `Bar.MyMethod' because it is sealed.
+// Line : 25
+
+using System;
+
+public class Foo {
+
+	public virtual void MyMethod ()
+	{
+		Console.WriteLine ("This is me !");
+	}
+}
+	      
+public class Bar : Foo {
+
+	public sealed override void MyMethod ()
+	{
+
+	}
+
+} 
+
+public class X : Bar {
+
+	public override void MyMethod ()
+	{
+
+	}
+	
+	public static void Main ()
+	{
+
+	}
+}