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

C#

 
QuestionHow to strip special characters from a field and replace with blanks Pin
Member 1375136828-Mar-18 3:17
Member 1375136828-Mar-18 3:17 
AnswerRe: How to strip special characters from a field and replace with blanks Pin
Gerry Schmitz28-Mar-18 5:50
mveGerry Schmitz28-Mar-18 5:50 
AnswerRe: How to strip special characters from a field and replace with blanks Pin
#realJSOP28-Mar-18 8:08
mve#realJSOP28-Mar-18 8:08 
QuestionForm1: Add combobox item from another form2: textbox Pin
Member 1374647827-Mar-18 10:20
Member 1374647827-Mar-18 10:20 
AnswerRe: Form1: Add combobox item from another form2: textbox Pin
OriginalGriff27-Mar-18 19:59
mveOriginalGriff27-Mar-18 19:59 
QuestionConvert IntPtr to Class Pin
Member 1263260127-Mar-18 0:47
Member 1263260127-Mar-18 0:47 
QuestionWeakEventHandler Sample Pin
Kevin Marois26-Mar-18 10:06
professionalKevin Marois26-Mar-18 10:06 
AnswerRe: WeakEventHandler Sample Pin
Dave Kreskowiak27-Mar-18 4:32
mveDave Kreskowiak27-Mar-18 4:32 
Are you looking to write your own WeakEventHandler implementation or could you just use one of the pre-built ones, listed in the inheritance tree, here[^]?

The code probably doesn't compile because the example is not meant as a copy'n'paste example. You have to replace certain works in the source with either your own implementations or with interface names of the event type you're looks for. You'd probably even have to extend WeakEventManager with your own implementations of certain methods, depending on what you're doing.

There are no "simple" examples of this thing. About the only thing I could suggest is looking at the .NET Reference Source for a similar implementation of what you're trying to do and using that as a framework to write your own code. For example, the source for PropertyChangedEventManager can be found here[^].


modified 27-Mar-18 10:48am.

GeneralRe: WeakEventHandler Sample Pin
Kevin Marois27-Mar-18 5:18
professionalKevin Marois27-Mar-18 5:18 
GeneralRe: WeakEventHandler Sample Pin
Dave Kreskowiak27-Mar-18 9:34
mveDave Kreskowiak27-Mar-18 9:34 
GeneralRe: WeakEventHandler Sample Pin
Kevin Marois27-Mar-18 9:37
professionalKevin Marois27-Mar-18 9:37 
GeneralRe: WeakEventHandler Sample Pin
Dave Kreskowiak27-Mar-18 10:16
mveDave Kreskowiak27-Mar-18 10:16 
GeneralRe: WeakEventHandler Sample Pin
Kevin Marois27-Mar-18 10:17
professionalKevin Marois27-Mar-18 10:17 
QuestionC#, SQL Time period between two columns Pin
Member 1374655226-Mar-18 6:47
Member 1374655226-Mar-18 6:47 
AnswerRe: C#, SQL Time period between two columns Pin
OriginalGriff26-Mar-18 8:20
mveOriginalGriff26-Mar-18 8:20 
AnswerRe: C#, SQL Time period between two columns Pin
MadMyche27-Mar-18 6:05
professionalMadMyche27-Mar-18 6:05 
QuestionOrdering names into list box Pin
Member 1374647825-Mar-18 21:15
Member 1374647825-Mar-18 21:15 
AnswerRe: Ordering names into list box Pin
Richard MacCutchan25-Mar-18 21:42
mveRichard MacCutchan25-Mar-18 21:42 
AnswerRe: Ordering names into list box Pin
OriginalGriff25-Mar-18 21:44
mveOriginalGriff25-Mar-18 21:44 
GeneralRe: Ordering names into list box Pin
#realJSOP26-Mar-18 2:06
mve#realJSOP26-Mar-18 2:06 
GeneralRe: Ordering names into list box Pin
OriginalGriff26-Mar-18 2:13
mveOriginalGriff26-Mar-18 2:13 
GeneralRe: Ordering names into list box Pin
Member 1374647826-Mar-18 2:52
Member 1374647826-Mar-18 2:52 
GeneralRe: Ordering names into list box Pin
OriginalGriff26-Mar-18 3:57
mveOriginalGriff26-Mar-18 3:57 
GeneralRe: Ordering names into list box Pin
#realJSOP26-Mar-18 5:27
mve#realJSOP26-Mar-18 5:27 
QuestionMin and Max or Range Pin
sunsher21-Mar-18 22:52
sunsher21-Mar-18 22:52 

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.