I am looking for something like idiomatic ruby for c# programmers
It should:
be for people that can already programm
be terse
not be to basic
just found a better thread for this question on stackoverflow: c-coding-standard-best-practices
I am looking for something like idiomatic ruby for c# programmers
It should:
be for people that can already programm
be terse
not be to basic
just found a better thread for this question on stackoverflow: c-coding-standard-best-practices
This is not a bad comparison between C# and Java, which hits most of the C# idioms, but beware that there are two different idioms at work here: C# idioms and .NET idioms. For example, in C#, it is perfectly acceptable to use underscore in identifiers, but not do in VB.NET, therefore while it is not mandated so, it is best practice to never use underscore in public identifiers so that VB.NET can access them.
You might want to try Effective C# and More Effective C#, both by Bill Wagner.
I haven't read either of them properly (must get round to doing so some time) but I've heard good things.
Assuming you're using C# 3, I would try to make sure you're familiar with:
IEnumerable<T>
and iterator blocksIf you want to ensure the style of your code is as per Microsoft's recommendations, take a look at StyleCop. Yes, it is very picky, and I don't agree entirely with all the rules, but in the general case it does make for more readable code, which is more consistent between developers.