danderson.io > c# > Page 4
Tag Archive: c#
If you have ever added a resource file to your project through the Project Properties > Resources tab, then you have used a ResourceManager. The resource manager allows you to access resources in your application simply through a static resource…
Read more
This question was asked on StackOverflow. Because my answer was upvoted well, I decided include it as a blog post. First, let’s talk about what ToString actually is. The ToString method lives in System.Object, and because System.Object is the base…
Read more
Overview. The goal of this article is to explain the mechanisms of passing structures and classes around in code. It will cover areas such as what it means to pass by value, pass by reference, as well as the unique…
Read more
I just finished my activation system which is just a WCF service, finished all the unit tests and ensured they passed and met requirements. Now its time to make a test client, so I load up Visual Studio and start…
Read more
I just finished writing the technical whitepapers for my product activation service, so I started the actual implementation using WCF services. All was good, added the usual WCF Service Application project, ran a quick F5, and swapped out all the…
Read more
Simple enough. If you want to ensure exact order translate the local variable function Func(Of double,double,double,Tuple(Of double,double)) to an actual member function or static function.
I’m going to cover a easy example on the new asynchronous programming model in C# 5 and .NET 4.5 with the recent release of Visual Studio 11. The example we will be writing is a small WinForm that will calculate…
Read more
I will come back and add more detail to this blog at a later date, but I was helping on MSDN forums and wrote this neat example for someone. It uses the dynamic language runtime and C# 4.0 to take…
Read more
This was inspired by this question on StackOverflow. First off, this is bad design unless you are designing some sort of setup application. But, specifically for those who still wish to proceed, here is how you do it. Download Example…
Read more
.NET Framework 2.0 does not support extension methods out of the box, because you cannot reference System.Core that was introduced in .NET 3.5. However, by adding a simple attribute class you can use extension methods in .NET 2.0 as well….
Read more