Click here to Skip to main content
15,894,017 members
Home / Discussions / C#
   

C#

 
GeneralImageprocessing - Is there any color dropout algorithm for bitmap C# Pin
abcxyz8221-Jan-05 6:55
abcxyz8221-Jan-05 6:55 
Generalcalling events from a derived class Pin
Marc Clifton21-Jan-05 6:49
mvaMarc Clifton21-Jan-05 6:49 
GeneralRe: calling events from a derived class Pin
Nick Parker21-Jan-05 7:15
protectorNick Parker21-Jan-05 7:15 
GeneralRe: calling events from a derived class Pin
Corinna John21-Jan-05 7:19
Corinna John21-Jan-05 7:19 
GeneralRe: calling events from a derived class Pin
Heath Stewart21-Jan-05 7:24
protectorHeath Stewart21-Jan-05 7:24 
GeneralRe: calling events from a derived class Pin
Heath Stewart21-Jan-05 7:20
protectorHeath Stewart21-Jan-05 7:20 
GeneralRe: calling events from a derived class Pin
Marc Clifton21-Jan-05 7:27
mvaMarc Clifton21-Jan-05 7:27 
GeneralRe: calling events from a derived class Pin
Heath Stewart21-Jan-05 7:44
protectorHeath Stewart21-Jan-05 7:44 
Good question, and it's one I'm not sure about off the top of my head (damn you, Marc! Smile | :) ). Unfortunately, I don't have the time too look it up, but if you'd like to it'd be great to know.

I doubt it's a language issue, though. If anything it may be a CLI guidelines or even a rule, but if you were to write the class in IL (personally, I enjoy such pain and anguish) you could define the field as public or family (IL's "protected"). I did so, changed the name of the field (so I could access it in lieu of the public .event definition), and re-assembled it with ilasm.exe with no problems. Compiling the following driver app compiled and ran just fine with the expected output:
using System;
 
class Test2 : Test
{
  static void Main()
  {
    Test2 t = new Test2();
    t.Foo += new EventHandler(t.Test_Foo);
 
    if (t.FooEvent != null)
      t.FooEvent(t, EventArgs.Empty);
  }
 
  private void Test_Foo(object sender, EventArgs e)
  {
    Console.WriteLine("Hello, world!");
  }
}


This posting is provided "AS IS" with no warranties, and confers no rights.

Software Design Engineer
Developer Division Sustained Engineering
Microsoft

[My Articles] [My Blog]
GeneralAlternative view Pin
leppie21-Jan-05 9:10
leppie21-Jan-05 9:10 
GeneralOleDbDataReader Pin
Newbie_Toy21-Jan-05 6:19
Newbie_Toy21-Jan-05 6:19 
GeneralRe: OleDbDataReader Pin
Colin Angus Mackay21-Jan-05 6:54
Colin Angus Mackay21-Jan-05 6:54 
GeneralRe: OleDbDataReader Pin
Newbie_Toy21-Jan-05 6:58
Newbie_Toy21-Jan-05 6:58 
GeneralRe: OleDbDataReader Pin
Heath Stewart21-Jan-05 7:30
protectorHeath Stewart21-Jan-05 7:30 
GeneralUsing P/Invoke SendInput Pin
realmontanakid21-Jan-05 4:58
realmontanakid21-Jan-05 4:58 
GeneralRe: Using P/Invoke SendInput Pin
Nick Parker21-Jan-05 6:30
protectorNick Parker21-Jan-05 6:30 
GeneralRe: Using P/Invoke SendInput Pin
Dave Kreskowiak21-Jan-05 7:03
mveDave Kreskowiak21-Jan-05 7:03 
GeneralRead from .dbx-file Pin
larbo20421-Jan-05 4:36
larbo20421-Jan-05 4:36 
GeneralRe: Read from .dbx-file Pin
Heath Stewart21-Jan-05 7:26
protectorHeath Stewart21-Jan-05 7:26 
GeneralWinforms hierarchical datagrid Pin
rc7921-Jan-05 4:34
rc7921-Jan-05 4:34 
GeneralRe: Winforms hierarchical datagrid Pin
Heath Stewart21-Jan-05 7:46
protectorHeath Stewart21-Jan-05 7:46 
GeneralRe: Winforms hierarchical datagrid Pin
Bahadir Cambel21-Jan-05 14:54
Bahadir Cambel21-Jan-05 14:54 
GeneralRe: Winforms hierarchical datagrid Pin
Heath Stewart21-Jan-05 15:55
protectorHeath Stewart21-Jan-05 15:55 
GeneralWebservice and client problem Pin
WDI21-Jan-05 4:34
WDI21-Jan-05 4:34 
GeneralRe: Webservice and client problem Pin
leppie21-Jan-05 5:54
leppie21-Jan-05 5:54 
GeneralRe: Webservice and client problem Pin
WDI21-Jan-05 8:34
WDI21-Jan-05 8:34 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.