Please see
http://discuss.develop.com/archives/wa.exe?A2=ind0209C&L=DOTNET-CLR&P=R2
458&I=-3 for an explanation of what actually changed. In short, the
change docs are wrong.

Regards,
Jeroen

> -----Original Message-----
> From: Moderated discussion of advanced .NET topics.
> [mailto:ADVANCED-DOTNET@;DISCUSS.DEVELOP.COM] On Behalf Of Pinto, Ed
> Sent: Thursday, October 31, 2002 19:57
> To: [EMAIL PROTECTED]
> Subject: [ADVANCED-DOTNET] accessibility of delegates in 1.1
>
>
> The compatibility docs on the gotdotnet site seem to indicate that
> accessibility modifiers will now be honored by delegates.  See the
> following:
> http://www.gotdotnet.com/team/changeinfo/Backwards1.0to1.1/def
> ault.aspx#0000
> 0139
> <http://www.gotdotnet.com/team/changeinfo/Backwards1.0to1.1/de
> fault.aspx#000
> 00139>
>
> I've downloaded 1.1 to test this and it doesn't seem to be
> true.  Can anyone
> tell me what is going on?  Code looks like this:
>
> using System;
>
> public class AppMain
> {
>  static public void Main()
>  {
>   Bar oBar = new Bar();
>   Foo oFoo = new Foo(oBar);
>   oBar.Fire();
>  }
> }
>
> public class Foo
> {
>  public Foo(Bar voBar)
>  {
>   voBar.Baz += new EventHandler(HandlePriv);
>   voBar.Baz += new EventHandler(HandlePub);
>  }
>
>  private void HandlePriv(object sender, EventArgs e)
>  {
>   Console.WriteLine("Private handlers still work");
>  }
>
>  public void HandlePub(object sender, EventArgs e)
>  {
>   Console.WriteLine("Public handlers work");
>  }
>
> }
>
> public class Bar
> {
>  public event EventHandler Baz;
>
>  public void Fire()
>  {
>   if(Baz != null)
>    Baz(this, new EventArgs());
>  }
> }
>
> Thanks very much,
> Ed
>
>
> You can read messages from the Advanced DOTNET archive,
> unsubscribe from Advanced DOTNET, or
> subscribe to other DevelopMentor lists at http://discuss.develop.com.
>

You can read messages from the Advanced DOTNET archive, unsubscribe from Advanced 
DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to