TE
科技回声
首页24小时热榜最新最佳问答展示工作
GitHubTwitter
首页

科技回声

基于 Next.js 构建的科技新闻平台,提供全球科技新闻和讨论内容。

GitHubTwitter

首页

首页最新最佳问答展示工作

资源链接

HackerNews API原版 HackerNewsNext.js

© 2025 科技回声. 版权所有。

A matter of style in C#

2 点作者 annymsMthd超过 15 年前
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 条评论

asimjalis超过 15 年前
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 未加载
icey超过 15 年前
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 未加载
DanielStraight超过 15 年前
I would highly recommend reading Code Complete 2 by Steve McConnell.
评论 #782790 未加载
ScottWhigham超过 15 年前
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