<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Reflection on InternetException</title><link>https://internetexception.com/tags/reflection/</link><description>Recent content in Reflection on InternetException</description><generator>Hugo</generator><language>en-us</language><lastBuildDate>Tue, 28 Oct 2025 21:14:55 +0100</lastBuildDate><atom:link href="https://internetexception.com/tags/reflection/index.xml" rel="self" type="application/rss+xml"/><item><title>HLinq design</title><link>https://internetexception.com/2025/10/28/hlinq-design/</link><pubDate>Tue, 28 Oct 2025 21:14:55 +0100</pubDate><guid>https://internetexception.com/2025/10/28/hlinq-design/</guid><description>&lt;h2 id="a-bit-of-history"&gt;A bit of history&lt;/h2&gt;&#10;&lt;p&gt;I remember the day when I started writing the HLinq query language. It was weekend and I was experimenting with writing Single endpoints for &lt;a href="https://internetexception.com/2013/02/07/why-i-dont-like-python-anymore/" data-type="post" data-id="228"&gt;Hamster Wheel.&lt;/a&gt; Single endpoints were almost done and next step was to write List endpoint. This would allow to get list of records of specific type. After I got single GET returns correct data for chosen record id, list should not be hard to implement. Then just create, update and delete. Basic CRUD API in Hamster Wheel would be finished. I was thrilled that I actually was able to do such thing.&lt;/p&gt;</description></item><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>Reflection</title><link>https://internetexception.com/2022/10/19/reflection/</link><pubDate>Wed, 19 Oct 2022 16:44:33 +0200</pubDate><guid>https://internetexception.com/2022/10/19/reflection/</guid><description>&lt;ul&gt;&#10;&lt;li&gt;obtain information about types and members at runtime&lt;/li&gt;&#10;&lt;li&gt;create instances, invoke or access them&lt;/li&gt;&#10;&lt;li&gt;dynamic code generation&lt;/li&gt;&#10;&lt;/ul&gt;&#10;&lt;p&gt;Further read:&lt;/p&gt;&#10;&lt;p&gt;&lt;a href="https://learn.microsoft.com/en-us/dotnet/framework/reflection-and-codedom/reflection" target="_blank" rel="noopener noreferrer"&gt;https://learn.microsoft.com/en-us/dotnet/framework/reflection-and-codedom/reflection&lt;/a&gt;&#10;&lt;/p&gt;</description></item><item><title>Dynamic runtime delegates conversion</title><link>https://internetexception.com/2017/05/07/dynamic-runtime-delegates-conversion/</link><pubDate>Sun, 07 May 2017 11:53:00 +0200</pubDate><guid>https://internetexception.com/2017/05/07/dynamic-runtime-delegates-conversion/</guid><description>&lt;h3 id="introduction"&gt;Introduction&lt;/h3&gt;&#10;&lt;p&gt;Delegates can be converted easily to another type if you know types of those delegates. But if you do not know it is impossible without really complicated code.&lt;/p&gt;</description></item><item><title>Genereting proxies during runtime using Reflection.Emit</title><link>https://internetexception.com/2016/10/07/genereting-proxies-during-runtime-using-reflection-emit/</link><pubDate>Fri, 07 Oct 2016 12:29:00 +0200</pubDate><guid>https://internetexception.com/2016/10/07/genereting-proxies-during-runtime-using-reflection-emit/</guid><description>&lt;p&gt;&lt;em&gt;Reflection.Emit&lt;/em&gt; is very powerful tool. It creates IL code and since C# is converted into IL too, we have the same functionality as in C# and even more. It is very powerful and at the same time very complicated. Because of that it is worth to discuss how and for what it should be used. One idea is to create dynamic code with automatic implementations of interfaces - proxy types.&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><item><title>Faster than Reflection: Delegates. Part 2.</title><link>https://internetexception.com/2016/08/16/faster-than-reflection-delegates-part-2/</link><pubDate>Tue, 16 Aug 2016 12:59:00 +0200</pubDate><guid>https://internetexception.com/2016/08/16/faster-than-reflection-delegates-part-2/</guid><description>&lt;p&gt;&lt;strong&gt;This is second 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 article and looking for detailed explanation of how delegates works, how they are created and why, I strongly encourage you to read it first. If you are just looking for a way to create delegates for methods or constructors it is not necessary.&lt;/strong&gt; Last article in series you can find &lt;a href="https://internetexception.com/2016/09/02/faster-than-reflection-delegates-part-3/" title="Third part"&gt;here&lt;/a&gt;&#10;. 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. In previous &lt;a href="https://internetexception.com/2016/08/05/faster-than-reflection-delegates-part-1/"&gt;article&lt;/a&gt;&#10; and first one in series, we covered:&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Static&#10;&lt;ol&gt;&#10;&lt;li&gt;Properties&lt;/li&gt;&#10;&lt;li&gt;Fields&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;Instance&#10;&lt;ol&gt;&#10;&lt;li&gt;Properties&lt;/li&gt;&#10;&lt;li&gt;Fields&lt;/li&gt;&#10;&lt;li&gt;Indexers&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;p&gt;Now it is time to cover following members.&lt;/p&gt;&#10;&lt;ol&gt;&#10;&lt;li&gt;Static&#10;&lt;ol&gt;&#10;&lt;li&gt;Methods&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;/li&gt;&#10;&lt;li&gt;Instance&#10;&lt;ol&gt;&#10;&lt;li&gt;Methods&lt;/li&gt;&#10;&lt;li&gt;Constructors&lt;/li&gt;&#10;&lt;/ol&gt;&#10;&lt;/li&gt;&#10;&lt;/ol&gt;</description></item><item><title>Faster than Reflection: Delegates. Part 1.</title><link>https://internetexception.com/2016/08/05/faster-than-reflection-delegates-part-1/</link><pubDate>Fri, 05 Aug 2016 09:58:00 +0200</pubDate><guid>https://internetexception.com/2016/08/05/faster-than-reflection-delegates-part-1/</guid><description>&lt;p&gt;This article is first part of the series of three. Next ones you can find &lt;a href="https://internetexception.com/2016/08/16/faster-than-reflection-delegates-part-2/" title="Second part"&gt;here&lt;/a&gt;&#10; and &lt;a href="https://internetexception.com/2016/09/02/faster-than-reflection-delegates-part-3/" title="Third part"&gt;here&lt;/a&gt;&#10;. Code for all three articles, with new features and 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;&#10;&lt;h3 id="why-not-reflection"&gt;Why not Reflection?&lt;/h3&gt;&#10;&lt;p&gt;If you working with .NET and C# (probably other languages too), at some point, you will have to write more advanced and generic code, that i.e. reads all properties of a type, searches for attributes, etc. Or maybe you want to call some private method or property? It is not that rare to use some internal mechanism of framework or library. Usually, the first solution involves Reflection. But the thing is: Reflection is slow. Of course, it is sufficient if you need to use Reflection rarely and it is not the main code of the application. If it is used more often at some point, you will probably try to optimize it. And now is the fun part: how to do it?&lt;/p&gt;</description></item><item><title>ViewFactory for Xamarin application</title><link>https://internetexception.com/2016/07/09/viewfactory-for-xamarin-application/</link><pubDate>Sat, 09 Jul 2016 12:37:00 +0200</pubDate><guid>https://internetexception.com/2016/07/09/viewfactory-for-xamarin-application/</guid><description>&lt;h2 id="first-things-first---why"&gt;First things first - Why?&lt;/h2&gt;&#10;&lt;p&gt;First of all I do not like how creating of views and navigation works in Xamarin. There is much boilerplate needed to just navigate from one page to another. Typically like in &lt;a href="https://developer.xamarin.com/guides/xamarin-forms/getting-started/introduction-to-xamarin-forms/#Navigation" target="_blank" rel="noopener noreferrer"&gt;Xamarin documentation&lt;/a&gt;&#10; we have to obtain &lt;code&gt;INavigation&lt;/code&gt; interface instance, create instance of a new page, create instance of view model and all dependencies it requires. When you page do not require view model things are real easy and Xamarin sample is just enough.&lt;/p&gt;</description></item><item><title>Entity Framework Patterns extension and Unit Test in Visual Studio 2012</title><link>https://internetexception.com/2013/04/23/entity-framework-patterns-extension-and-unit-test-in-visual-studio-2012/</link><pubDate>Tue, 23 Apr 2013 02:18:00 +0200</pubDate><guid>https://internetexception.com/2013/04/23/entity-framework-patterns-extension-and-unit-test-in-visual-studio-2012/</guid><description>&lt;p&gt;Yesterday I was trying to make work simple test class in VS2012. I did not know what was wrong exactly. It was first project when I tried to glue together Entity Framework with repository pattern and Ninject as IoC container. Because of the fact that this was first time for solution like that I was sure that it is me, or rather source of my problem was indeed my code. But let&amp;rsquo;s not skip ahead.&lt;/p&gt;</description></item></channel></rss>