Click here to Skip to main content
15,888,521 members
Home / Discussions / C#
   

C#

 
Questioncode to store the original array index of the sorted array Pin
Arun Raj.K20-Jun-07 5:43
Arun Raj.K20-Jun-07 5:43 
QuestionDataSet does not support System.Nullable Pin
Brady Kelly20-Jun-07 5:25
Brady Kelly20-Jun-07 5:25 
AnswerRe: DataSet does not support System.Nullable PinPopular
Lisa Jorgensen20-Jun-07 7:29
Lisa Jorgensen20-Jun-07 7:29 
GeneralRe: DataSet does not support System.Nullable Pin
Brady Kelly20-Jun-07 7:47
Brady Kelly20-Jun-07 7:47 
SuggestionRe: DataSet does not support System.Nullable Pin
WiiMaxx24-Apr-14 1:29
WiiMaxx24-Apr-14 1:29 
QuestionAdvanced Search Pin
arslanjatt20-Jun-07 5:10
arslanjatt20-Jun-07 5:10 
AnswerRe: Advanced Search Pin
nateraaaa20-Jun-07 5:56
nateraaaa20-Jun-07 5:56 
Questionevent extender providers? Pin
TheShaver20-Jun-07 4:48
TheShaver20-Jun-07 4:48 
Hi there,

I have a problem. Here's the situation: I have a bunch of controls in a library. I'd like to build some forms using these controls, but I want all the controls to have 3 extra events that I have defined. Ideally, I don't want to have to write a new control class that derives from the existing control and adds the events, because there's a lot of control classes.

If it were possible, I'd like to write something like

<br />
public class ExtendedControl< T > : T { /* events */ }<br />
<br />
ExtendedControl< TreeView > treeView1 = new ExtendedControl< TreeView >( );<br />


Sadly, naked generic parameters can't be inherited. Sometimes, I long for templates...

I was kind of hoping that I could create an IExtenderProvider-style class that can be added to the component tray of a form, and adds the 3 events to all controls added to the form. But IExtenderProvider only lets you add new properties, right?

Does anyone have any good ideas about how i can automagically add the 3 events? or am i going to have to bite the bullet and write a crapload of almost identical derived classes?

Many thanks in advance
AnswerRe: event extender providers? Pin
Luc Pattyn20-Jun-07 4:52
sitebuilderLuc Pattyn20-Jun-07 4:52 
GeneralRe: event extender providers? Pin
TheShaver20-Jun-07 5:14
TheShaver20-Jun-07 5:14 
AnswerRe: event extender providers? Pin
Martin#20-Jun-07 4:57
Martin#20-Jun-07 4:57 
GeneralRe: event extender providers? Pin
TheShaver20-Jun-07 5:11
TheShaver20-Jun-07 5:11 
AnswerRe: event extender providers? Pin
Martin#20-Jun-07 5:07
Martin#20-Jun-07 5:07 
GeneralRe: event extender providers? Pin
TheShaver20-Jun-07 5:20
TheShaver20-Jun-07 5:20 
GeneralRe: event extender providers? Pin
Martin#20-Jun-07 5:23
Martin#20-Jun-07 5:23 
QuestionAnyone know of a web service like this? Pin
gantww20-Jun-07 4:30
gantww20-Jun-07 4:30 
AnswerRe: Anyone know of a web service like this? Pin
nateraaaa20-Jun-07 6:06
nateraaaa20-Jun-07 6:06 
QuestionTaking control of an already running process.. Pin
Ylno20-Jun-07 4:26
Ylno20-Jun-07 4:26 
AnswerRe: Taking control of an already running process.. Pin
Martin#20-Jun-07 4:29
Martin#20-Jun-07 4:29 
QuestionError in Web.Config page Pin
shyamts20-Jun-07 3:59
shyamts20-Jun-07 3:59 
AnswerRe: Error in Web.Config page Pin
Manas Bhardwaj20-Jun-07 4:02
professionalManas Bhardwaj20-Jun-07 4:02 
AnswerRe: Error in Web.Config page Pin
Not Active20-Jun-07 4:28
mentorNot Active20-Jun-07 4:28 
GeneralRe: Error in Web.Config page Pin
shyamts20-Jun-07 17:05
shyamts20-Jun-07 17:05 
GeneralTimer not firing Pin
hairy_hats20-Jun-07 3:56
hairy_hats20-Jun-07 3:56 
AnswerRe: Timer not firing Pin
Martin#20-Jun-07 4:00
Martin#20-Jun-07 4:00 

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.