nightkhaos Posted January 25, 2011 Report Share Posted January 25, 2011 am o librarie in C# si am un event OnReceivedData,libraria asta o includ in main program, cum fac sa adaug un delegate la functia OnReceivedData astfel incat cand se declanseaza OnReiceivedData eu sa chem o functie din MainProgram? Quote Link to comment Share on other sites More sharing options...
phreak Posted January 25, 2011 Report Share Posted January 25, 2011 Delegates and Events in C# / .NETdeci class.OnReceivedData += new OnReceivedDataHandler ( MyFunction );unde inlocuiesti OnReceivedDataHandler cu delegatul asociat eventului si MyFunction cu o functie care are aceeasi parametrii si return type precum delegatul. Quote Link to comment Share on other sites More sharing options...
nightkhaos Posted January 25, 2011 Author Report Share Posted January 25, 2011 Am rezolvat am facut un delegate in libraria mea iar lui i-am adaugat o metoda din main program,apoi delegateul l-am chemat in eventul meu. Quote Link to comment Share on other sites More sharing options...
roberta11 Posted February 3, 2011 Report Share Posted February 3, 2011 Buna!Spuneti-mi va rog cum as putea sa fac in C#....am o baza de date in Access cu cateva tabele,iar in C# sa fac pe un Form adaugare,stergere si modificare,iar acele 3 butoane sa le activez. Quote Link to comment Share on other sites More sharing options...