<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Generics on InternetException</title><link>https://internetexception.com/tags/generics/</link><description>Recent content in Generics on InternetException</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Thu, 30 Mar 2023 11:04:03 +0200</lastBuildDate><atom:link href="https://internetexception.com/tags/generics/index.xml" rel="self" type="application/rss+xml"/><item><title>.NET/C# interview questions</title><link>https://internetexception.com/2022/10/26/net-c-interview-questions/</link><pubDate>Wed, 26 Oct 2022 10:21:52 +0200</pubDate><guid>https://internetexception.com/2022/10/26/net-c-interview-questions/</guid><description>&lt;ul&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://internetexception.com/2022/10/18/idisposable-interface-pattern/" data-type="URL" data-id="/2022/10/18/idisposable-interface-pattern/"&gt;&lt;code&gt;IDisposable&lt;/code&gt;&lt;/a&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://internetexception.com/2022/10/18/supressfinalize-in-idisposable-interface/" data-type="URL" data-id="/2022/10/18/supressfinalize-in-idisposable-interface/"&gt;&lt;code&gt;SupressFinalize&lt;/code&gt; in &lt;code&gt;IDisposable&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://internetexception.com/2022/10/19/asynchronous-programming-in-net/" data-type="URL" data-id="/2022/10/19/asynchronous-programming-in-net/"&gt;Asynchronous programming in .NET&lt;/a&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://internetexception.com/2022/10/19/async-await-in-c/" data-type="post" data-id="491"&gt;&lt;code&gt;async&lt;/code&gt;/&lt;code&gt;await&lt;/code&gt;&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;!-- --&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://internetexception.com/2022/10/19/avoid-deadlock-with-asynchronous-methods/"&gt;Avoid deadlock with &lt;code&gt;async&lt;/code&gt;/&lt;code&gt;await&lt;/code&gt;&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="http://2022/10/19/does-async-await-creates-new-thread/" target="_blank" rel="noopener noreferrer"&gt;Does &lt;code&gt;async&lt;/code&gt;/&lt;code&gt;await&lt;/code&gt; creates new thread?&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://internetexception.com/2022/10/19/cpu-bound-vs-i-o-bound/"&gt;CPU bound vs I/O bound tasks&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://internetexception.com/2022/10/19/what-is-synchronizationcontext-in-net/"&gt;SynchronizationContext&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://internetexception.com/2022/10/19/thread-vs-task-in-net/"&gt;Threads/tasks&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://internetexception.com/2022/10/19/locking-in-net/" data-type="URL" data-id="/2022/10/19/locking-in-net/"&gt;locking in .NET&lt;/a&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://internetexception.com/2022/10/19/locking-with-integer/" data-type="post" data-id="513"&gt;locking with integer&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://internetexception.com/2022/10/19/task-parallel-library-tpl/" data-type="URL" data-id="/2022/10/19/task-parallel-library-tpl/"&gt;TPL&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://internetexception.com/2022/10/19/threadpool/" data-type="URL" data-id="/2022/10/19/threadpool/"&gt;ThreadPool&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://internetexception.com/2022/10/19/net-type-system/" data-type="URL" data-id="/2022/10/19/net-type-system/"&gt;Type system&lt;/a&gt;&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://internetexception.com/2022/10/19/reference-types-vs-value-types/" data-type="URL" data-id="/2022/10/19/reference-types-vs-value-types/"&gt;Reference types vs value types&lt;/a&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://internetexception.com/2022/10/19/value-types-as-fields-in-objects/" data-type="URL" data-id="/2022/10/19/value-types-as-fields-in-objects/"&gt;value types as fields in objects&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;!-- --&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;&lt;a href="https://internetexception.com/2022/10/19/what-type-can-not-be-object-field/"&gt;What kind of types cannot be object field?&lt;/a&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://internetexception.com/2022/10/19/ref-struct-types/" data-type="URL" data-id="/2022/10/19/ref-struct-types/"&gt;&lt;code&gt;ref struct&lt;/code&gt; types&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://internetexception.com/2022/10/19/strings-in-net/" data-type="post" data-id="535"&gt;Strings in .NET&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://internetexception.com/2022/10/19/data-structures-in-net/" data-type="post" data-id="537"&gt;Data Structures&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://internetexception.com/2022/10/19/net-generics/" data-type="URL" data-id="/2022/10/19/net-generics/"&gt;Generics&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://internetexception.com/2022/10/19/covariance-and-contravariance/" data-type="post" data-id="541"&gt;Covariance and Contravariance&lt;/a&gt;&lt;/li&gt;&#10;&lt;li&gt;&lt;a href="https://internetexception.com/2022/10/25/equals-and-gethashcode/" data-type="post" data-id="587"&gt;Equals and GetHashCode&lt;/a&gt;&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;&#10;&lt;p&gt;&lt;a href="https://internetexception.com/2022/10/19/garbage-collector/" data-type="post" data-id="545"&gt;Garbage Collector&lt;/a&gt;&lt;/p&gt;</description></item><item><title>.NET Generics</title><link>https://internetexception.com/2022/10/19/net-generics/</link><pubDate>Wed, 19 Oct 2022 15:48:04 +0200</pubDate><guid>https://internetexception.com/2022/10/19/net-generics/</guid><description>&lt;p&gt;Allow for:&lt;/p&gt;&#10;&lt;ul&gt;&#10;&lt;li&gt;generalization of logic based on available types&lt;/li&gt;&#10;&lt;li&gt;specify possible supported types&lt;/li&gt;&#10;&lt;li&gt;re-usability of code&lt;/li&gt;&#10;&lt;li&gt;type safety&lt;/li&gt;&#10;&lt;li&gt;defers the exact specification of logic until the class or method is declared and instantiated by user code with all type parameters specified&lt;/li&gt;&#10;&lt;li&gt;mostly used for collections (some non-generic versions of collection are not recommended like &lt;code&gt;ArrayList&lt;/code&gt; i.e.)&lt;/li&gt;&#10;&lt;li&gt;information of exact type parameters used in a generic can be obtained at runtime by reflection&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Further read:&lt;/p&gt;</description></item><item><title>Faster than Reflection: Delegates. Part 3.</title><link>https://internetexception.com/2016/09/02/faster-than-reflection-delegates-part-3/</link><pubDate>Fri, 02 Sep 2016 13:15:00 +0200</pubDate><guid>https://internetexception.com/2016/09/02/faster-than-reflection-delegates-part-3/</guid><description>&lt;p&gt;&lt;strong&gt;This is third article in series, that explains how to create delegates for public and non-public members of public, non-public or not known in compile-time types. If you are not familiar with previous articles and looking for detailed explanation of how delegates works, how they are created and why, I strongly encourage you to read first two. If you are just looking for a way to create delegates for methods or constructors it is not necessary.&lt;/strong&gt; Code with new features and with bug fixes is available on &lt;a href="https://github.com/npodbielski/Delegates" target="_blank" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&#10; and as &lt;a href="https://www.nuget.org/packages/DelegatesFactory/1.0.0" target="_blank" rel="noopener noreferrer"&gt;Nuget&lt;/a&gt;&#10; package.&lt;/p&gt;</description></item></channel></rss>