DEV Community


Discussion on: Why C# is (one of) my favorite language?

turnerj profile image
James Turner

I love C#, it is my favourite language. I actually do like the coding conventions in C#, editing code in Visual Studio is great and .NET Core is fast!

If I had to be picky about what I don't like with it, it is probably the query syntax for LINQ.

For example, I don't like this (query syntax):

var numQuery =
    from num in numbers
    where (num % 2) == 0
    select num;

I prefer this (method syntax):

var numQuery = numbers.Where(num => num % 2 == 0);
saint4eva profile image

I love method syntax better.

Forem Open with the Forem app