Gunnar Peipman's ASP.NET blog

Browse by Tags

All Tags » .NET (RSS)
var is like (good) wine
Keyword var is cool thing we can use to make our code more readable for other programmers and why not - reviewers. But var can also be used to make our code difficult to understand. In this case, lte's say, we are overusing var. So, var is like wine ...
C# and anonymous types
One cool feature of C# 3.0 is support of anonymous types. Let's suppose we have to create some data structure and we need this structure in one place in one method. This far we had to create a new private class or structure. With anonymous types we don...
Behind the Compiler
"What will happen behind compiler?" is my favourite questsion when dealing with technical design and coding. There are many cool and powerful things we can use to be more productive, faster and better. We have automatic properties , extension...
Pager class
Once I wrote a class to make paging calculations. I had some data bound user controls that had no paging support. So I had to improvise. As it is was pointless to duplicate pager code to every user control where I needed paging I wrote a class to make...
Posted: May 15 2008, 07:58 PM by DigiMortal | with 2 comment(s)
Filed under: ,
Getting distinct values from arrays (through .NET Framework history)
Getting distinct values from arrays is not a unique problem. Here will I show some options how to do it. We are will use array of integer in examples here. This blog entry shows you somehow the mighty evolution of .Net Framework. Let's say we have array...
Posted: May 15 2008, 11:00 AM by DigiMortal | with 4 comment(s)
Filed under: ,
Extension method for enumerators
Extensions methods are pretty powerful thing because we can extend existing types without inheriting from them . I don't know developers who want to extend string or int or other basic types offered by .Net Framework. There was a project lately where...
Posted: May 13 2008, 01:09 AM by DigiMortal | with no comments
Filed under: ,
How to bulletproof the loops
Here is one example about how to bulletproof the loops. This example holds well for legacy code and - of course - for hurry-written-code (that might be the current one, unfortunately). One of the most dangerous things I've seen are pieces of code that...
Using Version Class
When dealing with version numbers we often need to convert them to string and vice versa. There is lot of code where versions are handled manually in code. I don't know why. But I know for sure there is class called Version and I'm sure this class will...
Posted: Apr 03 2008, 02:41 AM by DigiMortal | with 2 comment(s)
Filed under: ,
Is Automatic Property Same as Property?
I was listening one session on TechEd (night after long party, yeah) and I was thinking about automatic properties - are they really exact equivalent to usual properties? Something made me suspicious, so I opened my laptop at first free moment and checked...
Windows Installer and Extensibility.dll
Windows Installer is one of my favorite problem childs - of course, when it has mysteriuos problems. I found a problem when installing Outlook add-in on machine that has no extensibility features installed on it. Something was missing and installer gave...
More Posts Next page »