Convert string to Guid

by Alex Siepman 14. July 2015 18:00
Convert a string like "Alex" to a Guid with value: 1fe62611-cd3f-46e3-1e09-0ccb19e446e7. The same string always results in the same guid. [More]



SequentialGuid version 2, with IComparable and creation date and time

by Alex Siepman 20. June 2015 21:00
A wrapper around Guid makes ordering fast in the database. This new version can also be used to get the creating date and time. Also SequentialGuids can be compared in C# like they are compared in SQL Server. [More]

Add context to IEnumerable<> elements

by Alex Siepman 9. February 2015 20:13
The WithContext extesnion method adds context to an IEnumerable Sequence like previous and next element but also the index in the sequence and even more: IsFirst, IsLast, Preceding, Following, Other etc. [More]

Random password generator with numbers and special characters

by Alex Siepman 31. May 2014 14:06
Random password generator with lowercase, uppercase, numbers and special characters. Each catagory can have a minimum number of characters. The minimum and maximum of the total length of the password is also a parameter of the method. Flexible enough for 99,9% of all situations. [More]

Paging with Linq to objects

by Alex Siepman 16. May 2014 20:22
An extension method that makes paging in Linq to objects easy and efficient. [More]

Ultimate command line arguments parsing: query with Linq

by Alex Siepman 26. March 2014 14:05
Command line parsing in C# is (Static Main(args []string) is very limited. That is why I created a ParameterParser class that results a list of Parameter objects that can be queried with Linq. With this list, it's easy to get almost any information about the parameters you want to know. The syntax is also very easy. No weird RexEg of other parser formats but just regular methods that are easy to use.
This will be the only comand line parser you ever need, or your money back ;-) [More]

Lazy<T> property caching alternative

by Alex Siepman 17. March 2014 20:50
Lazy Has some disadvantages when you use it for caching properties, If you use other members of a class, it has to be set in the constructor. I created an anternative so you can implement the property in the property. Also caching IEnumerable makes no sence because you get a new iterator all the time so in fact it is not cached at all. This is also fixed, [More]

Create your own navigation system (with a Graph, Node and Connection class)

by Alex Siepman 2. March 2014 14:20
Lots of people uses naviagtion systems like TomTom these days. As a C# deveoper you might want to know what the basic principles are behind these systems. This post shows you 3 fully functional classes behind the principles of a navigation system. [More]



Simple IoC container, makes it easier to debug

by Alex Siepman 15. February 2014 17:26
Most IoC Containers uses reflection for inversion of control. This makes it hard to debug and the compiler can not check the creation at compile time. That is why I ceated to class that makes it possible to tell the container how to create a new object by providing it a Func (lambda). This makes debugging much easier when it doesn't works as you expected. [More]



Permutations and missing values, helpful with unit testing

by Alex Siepman 13. January 2014 15:41
Creating of unit tests of al varations of 1 bool parameter usualy need 2 unit tests (false and true). But how do you create a parameter of type IEumerable. So many combinations are possible. A variant of the Permutations() method will help you to create almost all necessary combinations with just one extension method! [More]

About the author

I am a software architect at Roxit and also a C# Developer. My main interests in the area of ​​C# are LINQ and generics

Visit my personal homepage (Dutch) for more info about me.

Month List

Page List