Click here to Skip to main content
15,922,584 members
Home / Discussions / C#
   

C#

 
GeneralRe: CODE Pin
Renven30-Dec-09 4:03
Renven30-Dec-09 4:03 
GeneralRe: CODE Pin
Luc Pattyn30-Dec-09 4:38
sitebuilderLuc Pattyn30-Dec-09 4:38 
GeneralRe: CODE Pin
Daniel Grunwald30-Dec-09 4:42
Daniel Grunwald30-Dec-09 4:42 
GeneralRe: CODE Pin
Luc Pattyn30-Dec-09 4:58
sitebuilderLuc Pattyn30-Dec-09 4:58 
AnswerRe: Threads, speed up calculations Pin
#realJSOP30-Dec-09 2:27
professional#realJSOP30-Dec-09 2:27 
GeneralRe: Threads, speed up calculations Pin
Ben Fair30-Dec-09 3:19
Ben Fair30-Dec-09 3:19 
GeneralRe: Threads, speed up calculations Pin
Renven30-Dec-09 4:05
Renven30-Dec-09 4:05 
QuestionIntegrate sql server's Query Editor Window with C# Project Pin
Dot-Net-Dev30-Dec-09 0:50
Dot-Net-Dev30-Dec-09 0:50 
AnswerRe: Integrate sql server's Query Editor Window with C# Project Pin
Eddy Vluggen30-Dec-09 4:03
professionalEddy Vluggen30-Dec-09 4:03 
Questionhow to make web application using multipoint sdk Pin
krunal2529-Dec-09 23:45
krunal2529-Dec-09 23:45 
AnswerRe: how to make web application using multipoint sdk Pin
Jimmanuel30-Dec-09 3:02
Jimmanuel30-Dec-09 3:02 
QuestionTreeview doesn't update after treenode.remove Pin
eyalle29-Dec-09 23:14
eyalle29-Dec-09 23:14 
AnswerRe: Treeview doesn't update after treenode.remove Pin
Luc Pattyn30-Dec-09 0:44
sitebuilderLuc Pattyn30-Dec-09 0:44 
GeneralRe: Treeview doesn't update after treenode.remove Pin
eyalle30-Dec-09 0:48
eyalle30-Dec-09 0:48 
GeneralRe: Treeview doesn't update after treenode.remove Pin
Luc Pattyn30-Dec-09 1:25
sitebuilderLuc Pattyn30-Dec-09 1:25 
AnswerRe: Treeview doesn't update after treenode.remove Pin
Ben Fair30-Dec-09 3:25
Ben Fair30-Dec-09 3:25 
GeneralRe: Treeview doesn't update after treenode.remove Pin
eyalle30-Dec-09 3:28
eyalle30-Dec-09 3:28 
GeneralRe: Treeview doesn't update after treenode.remove Pin
Ben Fair30-Dec-09 3:32
Ben Fair30-Dec-09 3:32 
GeneralRe: Treeview doesn't update after treenode.remove Pin
eyalle30-Dec-09 3:38
eyalle30-Dec-09 3:38 
Questionretrive user rights from sql table Pin
Jassim Rahma29-Dec-09 22:53
Jassim Rahma29-Dec-09 22:53 
AnswerRe: retrive user rights from sql table Pin
Ben Fair30-Dec-09 3:04
Ben Fair30-Dec-09 3:04 
GeneralRe: retrive user rights from sql table Pin
Jassim Rahma30-Dec-09 10:54
Jassim Rahma30-Dec-09 10:54 
GeneralRe: retrive user rights from sql table Pin
Jassim Rahma13-Jan-10 7:43
Jassim Rahma13-Jan-10 7:43 
QuestionC# - listen to add/remove function from event Pin
bonzaiholding29-Dec-09 22:15
bonzaiholding29-Dec-09 22:15 
AnswerRe: C# - listen to add/remove function from event Pin
DaveyM6929-Dec-09 23:17
professionalDaveyM6929-Dec-09 23:17 
You mention 'my event' but I don't see any events in your code, only a delegate.

If you are using events then you can use the add and remove methods and call your other function there.
C#
public class DoItUser
{
    public DoItUser()
    {
        MyClass myClass = new MyClass();
        myClass.MyEvent += new DoItDelegate(DoItFunction);
    }

    private void DoItFunction(int i)
    {
        // ...
    }
}

public delegate void DoItDelegate(int i);

public class MyClass
{
    private DoItDelegate myEvent;

    public event DoItDelegate MyEvent
    {
        add
        {
            myEvent += value;
            DoSomethingElse();
        }
        remove { myEvent -= value; }
    }

    private void DoSomethingElse()
    {
        // ...
    }
}


Dave

BTW, in software, hope and pray is not a viable strategy. (Luc Pattyn)
Why are you using VB6? Do you hate yourself? (Christian Graus)

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.