https://bugzilla.novell.com/show_bug.cgi?id=381592
Summary: Accessing a protected event from within a generic class gives a CS0122: <class>.<event> is inaccessible due to its protection level. Product: Mono: Compilers Version: SVN Platform: x86-64 OS/Version: Ubuntu Status: NEW Severity: Major Priority: P5 - None Component: C# AssignedTo: mono-bugs@lists.ximian.com ReportedBy: [EMAIL PROTECTED] QAContact: mono-bugs@lists.ximian.com Found By: Other The following example produces the error reliably using System; namespace Test { public static class Program { public static void Main(string[] args) { Console.WriteLine("hello world"); } } public abstract class Class1<T1> { protected event EventHandler doSomething; } // the generics clause is required to reproduce // the bug. If it was defined as // Class2 : Class1<string>, the bug is does not appear. public class Class2<T> : Class1<T> { public event EventHandler DoSomething { add { this.doSomething += value; } remove { this.doSomething -= value; } } } } /* the following command line: gmcs abc.cs results in: abc.cs(22,36): error CS0122: `Test.Class1<T1>.doSomething' is inaccessible due to its protection level abc.cs(15,46): (Location of the symbol related to previous error) abc.cs(23,39): error CS0122: `Test.Class1<T1>.doSomething' is inaccessible due to its protection level abc.cs(15,46): (Location of the symbol related to previous error) Compilation failed: 2 error(s), 0 warnings */ -- Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the QA contact for the bug. You are the assignee for the bug. _______________________________________________ mono-bugs maillist - mono-bugs@lists.ximian.com http://lists.ximian.com/mailman/listinfo/mono-bugs