TE
TechEcho
Home24h TopNewestBestAskShowJobs
GitHubTwitter
Home

TechEcho

A tech news platform built with Next.js, providing global tech news and discussions.

GitHubTwitter

Home

HomeNewestBestAskShowJobs

Resources

HackerNews APIOriginal HackerNewsNext.js

© 2025 TechEcho. All rights reserved.

A matter of style in C#

2 pointsby annymsMthdover 15 years ago
Hello I am a c# developer. I am currently close to being hired by avid HNer but I have a couple of things with my coding style that I need to correct. I did not take any college courses on computer science and everything I know about c# and the .Net framework I have taught myself. I was wondering if anybody had any good articles or advice on writing clean and understandable code. I have been working professionally as a c# developer for almost 2 years and everything I have done has been solo. Learning how to write clear and concise code is a must and I would greatly appreciate any advice offered.

4 comments

asimjalisover 15 years ago
Can you understand the code you wrote a month ago? Also, do you use meaningful class names, method names and variable names? Beyond this maybe you want to post some of your code here and see what feedback you get.
评论 #782721 未加载
iceyover 15 years ago
Well, if you're not idiomatic with C# yet, that would be the very first place I'd start (by that I mean you know why you'd use StringBuilder vs. string concatenation, etc).<p>After that, make sure you're good about commenting code that isn't immediately obvious.<p>From that point, I'm afraid we'd probably need some samples to see where you might be going wrong or right.
评论 #782660 未加载
DanielStraightover 15 years ago
I would highly recommend reading Code Complete 2 by Steve McConnell.
评论 #782790 未加载
ScottWhighamover 15 years ago
I like the book "Effective C#: 50 Specific Ways to Improve Your C#" - it has a lot of good tips in quick, easy-to-implement-in-36-hours-or-less format. ISBN: 0321245660