+ if (InstanceExpr is EventExpr) {\r
+ \r
+ EventInfo ei = ((EventExpr) InstanceExpr).EventInfo;\r
+ \r
+ Expression ml = MemberLookup (\r
+ ec, ec.ContainerType, ei.Name,\r
+ MemberTypes.Event, AllBindingFlags | BindingFlags.DeclaredOnly, loc);\r
+\r
+ if (ml == null) {\r
+ //\r
+ // If this is the case, then the Event does not belong \r
+ // to this Type and so, according to the spec\r
+ // cannot be accessed directly\r
+ //\r
+ // Note that target will not appear as an EventExpr\r
+ // in the case it is being referenced within the same type container;\r
+ // it will appear as a FieldExpr in that case.\r
+ //\r
+ \r
+ Assign.error70 (ei, loc);\r
+ return null;\r
+ }\r
+ }\r
+ \r
+ \r