#csharp

Visual Basic.NET features I miss in C#

During last year, I’ve migrated hundreds of thousands of lines from Visual Basic.NET to C#.

Luckily, most difficult part of this was convincing client, that it is necessary. There are great automated tools for this nowadays, Roslyn be blessed.

But I still believe, that Visual Basic is really not bad language. It had many good features that C# copied and there are still few left, that I will miss.

These are those features.

read more …

Entity Framework Code First type safe eager loading

In Entity Framework Code First, you can achieve eager loading of entities by using Include method on DbQuery in from DbContext of your application.

read more …
#csharp

One line password generation in .Net using LINQ

When I wrote this code in use-once application, I thought that is rather weird part of code, but works just fine for this once case.
Then I realized, there is nothing wrong with the code. People, who are familiar with LINQ will have little problem reading it and it will work 100% reliably.

read more …