Please do not reply to this email- if you want to comment on the bug, go to the URL shown below and enter your comments there.
Changed by [EMAIL PROTECTED] http://bugzilla.ximian.com/show_bug.cgi?id=79637 --- shadow/79637 2006-10-10 18:22:55.000000000 -0400 +++ shadow/79637.tmp.15984 2006-10-10 18:22:55.000000000 -0400 @@ -0,0 +1,43 @@ +Bug#: 79637 +Product: Mono: Compilers +Version: 1.1 +OS: SUSE 9.2 +OS Details: +Status: NEW +Resolution: +Severity: +Priority: Normal +Component: C# +AssignedTo: [EMAIL PROTECTED] +ReportedBy: [EMAIL PROTECTED] +QAContact: [EMAIL PROTECTED] +TargetMilestone: --- +URL: +Cc: +Summary: CS1540 error when accessing protected property of base class + +Compiling the file below reports this error: + +MyCollection.cs(8,15): error CS1540: Cannot access protected member +`System.Collections.ObjectModel.Collection<T>.Items' via a qualifier of +type `MyCollection<T>'; the qualifier must be of type `MyCollection<T>' (or +derived from it) + +The Items property is a protected property of the base class Collection<T> +and should be accessible from derived classes. + +Steps to reproduce the problem: + +gmcs MyCollection.cs + +------------------------------------------ +using System.Collections.Generic; +using System.Collections.ObjectModel; + +public class MyCollection<T> : Collection<T> +{ + public void Foo() + { + T t = Items[0]; + } +} _______________________________________________ mono-bugs maillist - [email protected] http://lists.ximian.com/mailman/listinfo/mono-bugs
