DEV Community

loading...

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

Collapse
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);
Collapse
saint4eva profile image
saint4eva

I love method syntax better.

Forem Open with the Forem app