Click here to Skip to main content
15,887,321 members
Home / Discussions / C#
   

C#

 
GeneralRe: datagridview c# Pin
BobJanova8-Mar-12 3:44
BobJanova8-Mar-12 3:44 
GeneralRe: datagridview c# Pin
Caleb McElrath8-Mar-12 14:12
professionalCaleb McElrath8-Mar-12 14:12 
AnswerRe: datagridview c# Pin
PIEBALDconsult8-Mar-12 4:07
mvePIEBALDconsult8-Mar-12 4:07 
Questionimage proccessing Pin
mohammadhamid8-Mar-12 0:16
mohammadhamid8-Mar-12 0:16 
AnswerRe: image proccessing Pin
Abhinav S8-Mar-12 1:04
Abhinav S8-Mar-12 1:04 
AnswerRe: image proccessing Pin
Dave Kreskowiak8-Mar-12 3:23
mveDave Kreskowiak8-Mar-12 3:23 
Questionhow to communicate to usb port programically? Pin
neodeaths8-Mar-12 0:10
neodeaths8-Mar-12 0:10 
AnswerRe: how to communicate to usb port programically? Pin
Abhinav S8-Mar-12 0:16
Abhinav S8-Mar-12 0:16 
AnswerRe: how to communicate to usb port programically? Pin
Bernhard Hiller8-Mar-12 0:17
Bernhard Hiller8-Mar-12 0:17 
AnswerRe: how to communicate to usb port programically? Pin
Dave Kreskowiak8-Mar-12 3:20
mveDave Kreskowiak8-Mar-12 3:20 
QuestionSource Code Control shared Libraries/Assemblies Pin
Expert Coming7-Mar-12 20:08
Expert Coming7-Mar-12 20:08 
AnswerRe: Source Code Control shared Libraries/Assemblies Pin
PIEBALDconsult8-Mar-12 2:35
mvePIEBALDconsult8-Mar-12 2:35 
AnswerRe: Source Code Control shared Libraries/Assemblies Pin
BobJanova8-Mar-12 3:21
BobJanova8-Mar-12 3:21 
AnswerRe: Source Code Control shared Libraries/Assemblies Pin
jschell9-Mar-12 5:47
jschell9-Mar-12 5:47 
Questionread image in c# Pin
lieu_li7-Mar-12 15:53
lieu_li7-Mar-12 15:53 
AnswerRe: read image in c# Pin
Jaison Joy7-Mar-12 18:19
Jaison Joy7-Mar-12 18:19 
AnswerRe: read image in c# Pin
Abhinav S7-Mar-12 21:25
Abhinav S7-Mar-12 21:25 
AnswerRe: read image in c# Pin
OriginalGriff7-Mar-12 23:48
mveOriginalGriff7-Mar-12 23:48 
GeneralRe: read image in c# Pin
lieu_li8-Mar-12 16:21
lieu_li8-Mar-12 16:21 
GeneralRe: read image in c# Pin
OriginalGriff8-Mar-12 20:06
mveOriginalGriff8-Mar-12 20:06 
Questiontalking Pin
newlife2007-Mar-12 13:17
newlife2007-Mar-12 13:17 
AnswerRe: talking Pin
Bernhard Hiller7-Mar-12 20:26
Bernhard Hiller7-Mar-12 20:26 
Questionevent in c# Pin
tommmyyy1237-Mar-12 4:42
tommmyyy1237-Mar-12 4:42 
AnswerRe: event in c# Pin
PIEBALDconsult7-Mar-12 5:16
mvePIEBALDconsult7-Mar-12 5:16 
Because that's how events work in C#. Big Grin | :-D

Only the class that defines the event can access it that way; other classes can only add and remove handlers.
However, a common practice with events is for the class to declare a Raise method that will check for null and raise the event. Ideally this method would be private or protected, but you could make it public if you really wanted to. If you are just learning about events that may make some sense, but it's generally not a good idea as it pretty much violates the whole idea of events.

Furthermore, if that does make sense, maybe you just want a regular delegate rather than an event.

We would need to know more about what you are trying to accomplish.
GeneralRe: event in c# Pin
tommmyyy1237-Mar-12 5:55
tommmyyy1237-Mar-12 5:55 

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.