Can I set up a diary with reminders?
accessibility of delegates in 1.1
Hello Guest
  
  • Login
• Register…
• Start blog
  • Who, Where, When
• What is interesting here?
• Duels
  • Polls
• Avatars
• Interests
  • Cities and Countries
• Random blog
• Users search
  • Search
• Games
• Tests
• QAIX
  • Сообщества
• Talxy Chat
• Horoscope
• Online
 
Register!

QAIX > .Net Development > accessibility of delegates in 1.1 1 November 2002 19:06:57

  Top users: 
  Recent blog posts: 
  They have birthday today: 
  Forums:   
  Discuss: 
  Recent forum topics: 
  Recent forum comments:
  Модератор:

accessibility of delegates in 1.1

Ed Pinto 31 October 2002 21:57:04
 The compatibility docs on the gotdotnet site seem to indicate that
accessibility modifiers will now be honored by delegates. See the
following:
http://www.gotdotne­t.com/team/changeinf­o/Backwards1.0to1.1/­default.aspx#0000
0139
<http://www.gotdotn­et.com/team/changein­fo/Backwards1.0to1.1­/default.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(Handle­Priv);
voBar.Baz += new EventHandler(Handle­Pub);
}

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.deve­lop.com.

Add comment
Jeroen Frijters 1 November 2002 11:23:30 permanent link ]
 Please see
http://discuss.deve­lop.com/archives/wa.­exe?A2=ind0209C&L=DO­TNET-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: ADVANCED-DOTNET@DIS­CUSS.DEVELOP.COM> 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.gotdotne­t.com/team/changeinf­o/Backwards1.0to1.1/­def> ault.aspx#0000> 0139> <http://www.gotdotn­et.com/team/changein­fo/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(Handle­Priv);> voBar.Baz += new EventHandler(Handle­Pub);> }>
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.deve­lop.com.>

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

Add comment
Ed Pinto 1 November 2002 19:06:57 permanent link ]
 Huge sigh of relief...
Thanks,
Ed

-----Original Message-----
From: Jeroen Frijters [mailto:jeroen@SUMATRA.NL]
Sent: Friday, November 01, 2002 2:24 AM
To: ADVANCED-DOTNET@DIS­CUSS.DEVELOP.COM
Subject: Re: [ADVANCED-DOTNET] accessibility of delegates in 1.1


Please see
http://discuss.deve­lop.com/archives/wa.­exe?A2=ind0209C&L=DO­TNET-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: ADVANCED-DOTNET@DIS­CUSS.DEVELOP.COM> 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.gotdotne­t.com/team/changeinf­o/Backwards1.0to1.1/­def> ault.aspx#0000> 0139 <http://www.gotdotn­et.com/team/changein­fo/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(Handle­Priv);> voBar.Baz += new EventHandler(Handle­Pub);> }>
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.deve­lop.com.>

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

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

Add comment
 

Add new comment

As:
Login:  Password:  
 
 
  
 
Пожалуйста, относитесь к собеседникам уважительно, не используйте нецензурные слова, не злоупотребляйте заглавными буквами, не публикуйте рекламу и объявления о купле/продаже, а также материалы нарушающие сетевой этикет или законы РФ. Ваш ip-адрес записывается.


QAIX > .Net Development > accessibility of delegates in 1.1 1 November 2002 19:06:57

see also:
Trouble passing variable to function
Looking for a REALLY BUSY RSS feed
how to get value from a function in…
pass tests:
ДЛЯ РУССКИХ ЧУВАКОВ
see also:

  Copyright © 2001—2010 QAIX
Идея: Монашёв Михаил.
Авторами текстов, изображений и видео, размещённых на этой странице, являются пользователи сайта.
See Help and FAQ in the community support.qaix.com.
Write in the community about the bugs you have noticedbugs.qaix.com.
Write your offers and comments in the communities suggest.qaix.com.
Information for parents.
Пишите нам на .
If you would like to report an abuse of our service, such as a spam message, please .
Если Вы хотите пожаловаться на содержимое этой страницы, пожалуйста .