dotnetomaniak.pl - Artykuły z tagiem delegatedotnetomaniak.pl - Artykuły z tagiem delegate2024-03-29T10:11:51Zhttps://dotnetomaniak.pl/Tags/delegateCopyright (c) dotnetomaniak.pldotnetomaniak.pl Atom Generatordotnetomaniak.pl webmasteradmin@dotnetomaniak.plhttps://dotnetomaniak.pl/Assets/Images/fav.icohttps://dotnetomaniak.pl/Assets/Images/dotnetomaniak_logo-negatyw_small.png9025https://dotnetomaniak.pl/Cannot-implicitly-convert-type-Abc-to-IAbc-Contravariance-vs-Covariance-part-2-A-Girl-Among-GeeksCannot implicitly convert type ‘Abc’ to ‘IAbc’ – Contravariance vs Covariance – part 2. – A Girl Among Geeks2019-06-03T22:58:31Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_2GBwFoippE2Mk5Q1Hjg7mg.png"/></div><div>Today I will write about the way variance influences type checking in C#. Yes, the fact that one type can be passed to a generic method that requires another type, depends on these 2 small keywords we write before ‘T’ (or whatever 😉) in interface header.</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/Cannot-implicitly-convert-type-Abc-to-IAbc-Contravariance-vs-Covariance-part-2-A-Girl-Among-Geeks"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=https%3a%2f%2fagirlamonggeeks.com%2f2019%2f06%2f04%2fcannot-implicitly-convert-type-abc-to-iabc-contravariance-vs-covariance-part-2%2f" style="border:0px"/></a></div></div>AGirlAmongGeekshttps://dotnetomaniak.pl/Users/BR4sTPFFt06GUon4bGbBcQ2019-06-04T05:47:43Zhttps://dotnetomaniak.pl/Cannot-implicitly-convert-type-Abc-to-IAbc-Contravariance-vs-Covariance-part-2-A-Girl-Among-Geeks1960Today I will write about the way variance influences type checking in C#. Yes, the fact that one type can be passed to a generic method that requires another type, depends on these 2 small keywords we write before ‘T’ (or whatever 😉) in interface header.https://agirlamonggeeks.com/2019/06/04/cannot-implicitly-convert-type-abc-to-iabc-contravariance-vs-covariance-part-2/http://dotnetomaniak.pl/Data/Thumbnails/small_2GBwFoippE2Mk5Q1Hjg7mg.pnghttps://dotnetomaniak.pl/C-stuff-nobody-told-you-delegate-is-a-class-And-there-is-a-good-reason-for-that-A-Girl-Among-GeeksC# stuff nobody told you – delegate is a class! And there is a good reason for that! – A Girl Among Geeks2018-03-03T17:38:12Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small__2IZsgVwx0eCo-VHGssILQ.png"/></div><div>Have you ever wondered why blue screens of death happen so rarely, nowadays? Of course, we can thank Microsoft for this but the way they fixed this problem is not so obvious! According to Marino Posadas (and his book Mastering C# and .Net Framework) back in 2010, Microsoft made an analysis of this topic and they came to the conclusion that the 90% (wow!) of the blue screens were caused by drivers! So, Microsoft made manufacturers to follow the Hardware Compatibility List. That somehow solved most of...</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/C-stuff-nobody-told-you-delegate-is-a-class-And-there-is-a-good-reason-for-that-A-Girl-Among-Geeks"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2fagirlamonggeeks.com%2f2018%2f03%2f03%2fc-stuff-nobody-told-you-delegate-is-a-class-and-there-is-a-good-reason-for-that%2f" style="border:0px"/></a></div></div>AGirlAmongGeekshttps://dotnetomaniak.pl/Users/BR4sTPFFt06GUon4bGbBcQ2018-03-13T09:24:20Zhttps://dotnetomaniak.pl/C-stuff-nobody-told-you-delegate-is-a-class-And-there-is-a-good-reason-for-that-A-Girl-Among-Geeks11860Have you ever wondered why blue screens of death happen so rarely, nowadays? Of course, we can thank Microsoft for this but the way they fixed this problem is not so obvious! According to Marino Posadas (and his book Mastering C# and .Net Framework) back in 2010, Microsoft made an analysis of this topic and they came to the conclusion that the 90% (wow!) of the blue screens were caused by drivers! So, Microsoft made manufacturers to follow the Hardware Compatibility List. That somehow solved most of...http://agirlamonggeeks.com/2018/03/03/c-stuff-nobody-told-you-delegate-is-a-class-and-there-is-a-good-reason-for-that/http://dotnetomaniak.pl/Data/Thumbnails/small__2IZsgVwx0eCo-VHGssILQ.pnghttps://dotnetomaniak.pl/C-Delegates-a-fairy-tale-about-when-and-how-to-use-them-A-Girl-Among-GeeksC# Delegates – a fairy tale about when (and how) to use them – A Girl Among Geeks2018-02-19T21:23:37Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_X4UlqgYs10myF3z3mDE0FQ.png"/></div><div>Many people neglect C# delegates because they cannot find a reason to use them. On the other hand, there is (rather small) group of people who overuse delegates in code that could be easily replaced by literal method call. So when should we use delegates? Well, they show their real power in situations when we need a mechanism to easily switch from one logic to another, without changing our application’s core code.
Sounds ok but what does it mean in a real life? It’s time for a fairy tale 😊. Imagine...</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/C-Delegates-a-fairy-tale-about-when-and-how-to-use-them-A-Girl-Among-Geeks"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2fagirlamonggeeks.com%2f2018%2f02%2f19%2fc-delegates-a-fairy-tale-about-when-and-how-to-use-them%2f" style="border:0px"/></a></div></div>AGirlAmongGeekshttps://dotnetomaniak.pl/Users/BR4sTPFFt06GUon4bGbBcQ2018-03-01T07:11:53Zhttps://dotnetomaniak.pl/C-Delegates-a-fairy-tale-about-when-and-how-to-use-them-A-Girl-Among-Geeks21140Many people neglect C# delegates because they cannot find a reason to use them. On the other hand, there is (rather small) group of people who overuse delegates in code that could be easily replaced by literal method call. So when should we use delegates? Well, they show their real power in situations when we need a mechanism to easily switch from one logic to another, without changing our application’s core code.
Sounds ok but what does it mean in a real life? It’s time for a fairy tale 😊. Imagine...http://agirlamonggeeks.com/2018/02/19/c-delegates-a-fairy-tale-about-when-and-how-to-use-them/http://dotnetomaniak.pl/Data/Thumbnails/small_X4UlqgYs10myF3z3mDE0FQ.pnghttps://dotnetomaniak.pl/O-delegatach-O delegatach ...2017-05-22T15:42:13Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_jmxQayJmvUqEd7K-Vstxmw.png"/></div><div>Delegaty to obiekty, w których wywołuje się inne metody (przechowuje referencje do metod). Delegaty przypominają działaniem wskaźniki z języka C++, ale ich przewagą jest to, że nie mogą odwoływać się do metody, której sygnatura nie odpowiada sygnaturze delegata – czyli: metoda musi przyjmować takie same argumenty i zwracać taki sam typ, jaki podano w deklaracji delegata.</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/O-delegatach-"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2fkrukcom.pl%2fdsp2017%2f14-delegate%2f" style="border:0px"/></a></div></div>lkrukhttps://dotnetomaniak.pl/Users/g4y6TckhoUuk0h9Y1FMPAw2017-05-26T16:07:48Zhttps://dotnetomaniak.pl/O-delegatach-11180Delegaty to obiekty, w których wywołuje się inne metody (przechowuje referencje do metod). Delegaty przypominają działaniem wskaźniki z języka C++, ale ich przewagą jest to, że nie mogą odwoływać się do metody, której sygnatura nie odpowiada sygnaturze delegata – czyli: metoda musi przyjmować takie same argumenty i zwracać taki sam typ, jaki podano w deklaracji delegata.http://krukcom.pl/dsp2017/14-delegate/http://dotnetomaniak.pl/Data/Thumbnails/small_jmxQayJmvUqEd7K-Vstxmw.pnghttps://dotnetomaniak.pl/Delegate-GetInvocationList-Siepacze-KoduDelegate – GetInvocationList – Siepacze Kodu2016-04-07T14:19:16Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_7Q4-GkZdwE6_j7TUM2qajg.png"/></div><div>Jak wiemy delegaty w języku C# zawierają referencje do metod o określonych wcześniej parametrach oraz typie jaki dana metoda zwraca.</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/Delegate-GetInvocationList-Siepacze-Kodu"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2fwww.siepaczekodu.pl%2f2016%2f03%2f16%2fdelegate-getinvocationlist%2f" style="border:0px"/></a></div></div>Zabahttps://dotnetomaniak.pl/Users/Om73jYhiD0uMHvJ-zL2zCA2016-04-12T06:54:27Zhttps://dotnetomaniak.pl/Delegate-GetInvocationList-Siepacze-Kodu21380Jak wiemy delegaty w języku C# zawierają referencje do metod o określonych wcześniej parametrach oraz typie jaki dana metoda zwraca.http://www.siepaczekodu.pl/2016/03/16/delegate-getinvocationlist/http://dotnetomaniak.pl/Data/Thumbnails/small_7Q4-GkZdwE6_j7TUM2qajg.pnghttps://dotnetomaniak.pl/Wskazowka-w-jezyku-C-delegate-Mikoleusz-BlogWskazówka w języku C#: delegate – Mikoleusz Blog2016-02-25T23:36:31Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_X9YlYhdL2Umif1Pwnyi6rA.png"/></div><div>Są takie słowa kluczowe w języku C#, bez których można się obejść. Tylko po co się ograniczać, jeśli ich zrozumienie może zaoszczędzić nam czas, liczbę linii kodu do napisania… i wzbudzić zazdrość wśród Javowców :) Zapraszam na trzy słowa o delegate.</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/Wskazowka-w-jezyku-C-delegate-Mikoleusz-Blog"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2fwww.mikoleusz.pl%2fwskazowka-w-jezyku-c-delegate%2f" style="border:0px"/></a></div></div>Mikoleuszhttps://dotnetomaniak.pl/Users/oCrlGCRV00-D4Pqsilu8TA2016-03-06T07:53:11Zhttps://dotnetomaniak.pl/Wskazowka-w-jezyku-C-delegate-Mikoleusz-Blog44010Są takie słowa kluczowe w języku C#, bez których można się obejść. Tylko po co się ograniczać, jeśli ich zrozumienie może zaoszczędzić nam czas, liczbę linii kodu do napisania… i wzbudzić zazdrość wśród Javowców :) Zapraszam na trzy słowa o delegate.http://www.mikoleusz.pl/wskazowka-w-jezyku-c-delegate/http://dotnetomaniak.pl/Data/Thumbnails/small_X9YlYhdL2Umif1Pwnyi6rA.pnghttps://dotnetomaniak.pl/Obs%C5%82uga-zdarze%C5%84-w-C-delegaty-i-eventyObsługa zdarzeń w C# - delegaty i eventy2010-10-11T20:42:37Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_Y7htpgt6zkKUADVAgVrdXA.png"/></div><div>Obsługa zdarzeń, jest niezwykle ważna w każdym języku programowania. Pozwala ona na sprawne wykonywanie operacji związanych z aktualnym przetwarzaniem wykonywanym w aplikacji. Dla programisty, ważne jest aby ten proces przebiegał w sposób jak najbardziej automatyczny. Dlatego w dzisiejszym tekście, postaram się opisać delegaty oraz tworzone na ich podstawie zdarzenia (z ang. events).</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/Obs%C5%82uga-zdarze%C5%84-w-C-delegaty-i-eventy"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2fwww.altcontroldelete.pl%2fartykuly%2fobsluga-zdarzen-w-c-delegaty-i-eventy%2f" style="border:0px"/></a></div></div>https://me.yahoo.com/a/EuokjNNzofgU9z8BbPi_zYq2SM.dxqxHEPJyAa4-#c09achttps://dotnetomaniak.pl/Users/ajPG25W2WUywYhDzARfWAw2010-10-21T11:54:50Zhttps://dotnetomaniak.pl/Obs%C5%82uga-zdarze%C5%84-w-C-delegaty-i-eventy26750Obsługa zdarzeń, jest niezwykle ważna w każdym języku programowania. Pozwala ona na sprawne wykonywanie operacji związanych z aktualnym przetwarzaniem wykonywanym w aplikacji. Dla programisty, ważne jest aby ten proces przebiegał w sposób jak najbardziej automatyczny. Dlatego w dzisiejszym tekście, postaram się opisać delegaty oraz tworzone na ich podstawie zdarzenia (z ang. events).http://www.altcontroldelete.pl/artykuly/obsluga-zdarzen-w-c-delegaty-i-eventy/http://dotnetomaniak.pl/Data/Thumbnails/small_Y7htpgt6zkKUADVAgVrdXA.pnghttps://dotnetomaniak.pl/xionlog-Funkcje-jako-dane-wej%C5%9Bciowexion.log » Funkcje jako dane wejściowe2009-05-29T17:45:37Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_zjFSiWFmL0qJRtAnxA2GbA.png"/></div><div>Sporo algorytmów jako swoje parametry przyjmuje różnego typu funkcje, które potem są wykorzystywane w trakcie ich działania. Prostym przykładem są tu wszelkiego rodzaju sortowania czy wyszukiwania, umożliwiające często podanie własnego predykatu (funkcji zwracającej wartość logiczną). W bardziej skomplikowanej wersji może chodzić chociażby o algorytm genetyczny lub przeszukujący drzewo gry, który wykorzystuje do działania jakąś funkcję oceniającą (np. osobników w populacji).
Na takie okazje różne języki pr...</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/xionlog-Funkcje-jako-dane-wej%C5%9Bciowe"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2fxion.org.pl%2f2009%2f05%2f29%2ffunkcje-jako-dane-wejsciowe%2f" style="border:0px"/></a></div></div>Paweł Łukasikhttps://dotnetomaniak.pl/Users/lI7X-wDfeE2RoUfuiihoOg2009-06-08T16:01:34Zhttps://dotnetomaniak.pl/xionlog-Funkcje-jako-dane-wej%C5%9Bciowe1500Sporo algorytmów jako swoje parametry przyjmuje różnego typu funkcje, które potem są wykorzystywane w trakcie ich działania. Prostym przykładem są tu wszelkiego rodzaju sortowania czy wyszukiwania, umożliwiające często podanie własnego predykatu (funkcji zwracającej wartość logiczną). W bardziej skomplikowanej wersji może chodzić chociażby o algorytm genetyczny lub przeszukujący drzewo gry, który wykorzystuje do działania jakąś funkcję oceniającą (np. osobników w populacji).
Na takie okazje różne języki pr...http://xion.org.pl/2009/05/29/funkcje-jako-dane-wejsciowe/http://dotnetomaniak.pl/Data/Thumbnails/small_zjFSiWFmL0qJRtAnxA2GbA.pnghttps://dotnetomaniak.pl/Zdarzenia-w-CZdarzenia w C#2009-04-18T14:12:59Z<div><div><div style="float:right"><img alt ="" src="http://dotnetomaniak.pl/Data/Thumbnails/small_hyTNwZFOC0ecl45h-YpoyQ.png"/></div><div>Zdarzenia nie są tak proste, jak się wydają. Do "autopromocji" skłoniła mnie beztroska w wywoływaniu zdarzeń, jaką zauważyłem w jednym z tutejszych artykułów.</div></div><div style="padding-top:4px"><a rev="vote-for" href="https://dotnetomaniak.pl/Zdarzenia-w-C"><img alt="Podbij ↑" src="https://dotnetomaniak.pl/image.axd?url=http%3a%2f%2folog.orb.net.pl%2f%3fp%3d26" style="border:0px"/></a></div></div>brainhttps://dotnetomaniak.pl/Users/-UHklidvhkeu2RUIvxRwVw2009-04-28T06:43:08Zhttps://dotnetomaniak.pl/Zdarzenia-w-C43110Zdarzenia nie są tak proste, jak się wydają. Do "autopromocji" skłoniła mnie beztroska w wywoływaniu zdarzeń, jaką zauważyłem w jednym z tutejszych artykułów.http://olog.orb.net.pl/?p=26http://dotnetomaniak.pl/Data/Thumbnails/small_hyTNwZFOC0ecl45h-YpoyQ.png