C# 从 .NET 开始

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/24252/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-08-01 09:13:14  来源:igfitidea点击:

Starting with .NET

提问by onnodb

Being a self-taught "amateur" programmer, I do most programming in my spare time, for relatively small projects, or for small study-related utilities. I greatly enjoy it, though, and have learned a great deal over the past couple of years. Through various weblogs and websites, I've become acquainted with version control, bug tracking, unit testing etc.

作为一名自学成才的“业余”程序员,我在业余时间为相对较小的项目或与学习相关的小型实用程序进行大部分编程。不过,我非常喜欢它,并且在过去几年中学到了很多东西。通过各种博客和网站,我熟悉了版本控制、错误跟踪、单元测试等。

The languages I'm currently working in are mostly Delphi (2007 for Win32), as well as some PHP. I've been very happy with both (actually, I'm using Delphi for a rather large side-project), but the things I've seen of .NET (especially C#) seem very, veryinteresting. I haven't really had the time to dive into .NET, though; also, it seems like there are some serious financial burdens one needs to overcome before one can get started with it (the whole VS stack is quite an investment for someone who doesn't spend his whole work day programming).

我目前使用的语言主要是 Delphi(2007 年的 Win32),以及一些 PHP。我对两者都非常满意(实际上,我将 Delphi 用于一个相当大的副项目),但是我所看到的 .NET(尤其是 C#)的东西似乎非常非常有趣。不过,我还没有真正有时间深入研究 .NET;此外,在开始使用它之前,似乎有一些严重的财务负担需要克服(整个 VS 堆栈对于那些没有花一整天的工作时间进行编程的人来说是一笔相当大的投资)。

So my question boils down to, actually, a couple of related questions:

所以我的问题实际上归结为几个相关的问题:

  • What strengths of .NET would make a switch to it worthwhile for an amateur programmer like me?
  • What are good resources to get started with .NET/C#, esp. books?
  • How would you build a relatively cheap development stack for .NET?
  • .NET 的哪些优势会让像我这样的业余程序员值得转用它?
  • 什么是开始使用 .NET/C# 的好资源,尤其是。图书?
  • 您将如何为 .NET 构建一个相对便宜的开发堆栈?

I realize this is a rather open question, but I haven't really found a good web resource that covers these topics. Also, advice from experienced programmers like you guys around here tends to be invaluable!

我意识到这是一个相当开放的问题,但我还没有真正找到涵盖这些主题的良好网络资源。此外,像你们这样有经验的程序员的建议往往是无价的!

Thanks a lot!

非常感谢!

回答by Micha? Piaskowski

How would you build a relatively cheap development stack for .NET?

您将如何为 .NET 构建一个相对便宜的开发堆栈?

Express eidtions of Visual Studioare free, and have everything you need to start writing in C#.

Visual Studio 的 Express eidtions是免费的,并且拥有开始用 C# 编写所需的一切。

回答by cschol

How would you build a relatively cheap development stack for .NET?

您将如何为 .NET 构建一个相对便宜的开发堆栈?

Downloadyour favorite edition of Visual Studio 2008 Express (free) and the .NET framework(free also).

下载您最喜欢的 Visual Studio 2008 Express 版本(免费)和.NET 框架(也免费)。

UPDATE: if you are not a fan of VS you can also try SharpDevelopan Open Source IDE for .NET.

更新:如果你不是 VS 的粉丝,你也可以尝试SharpDevelopan Open Source IDE for .NET。

回答by Corey

Apress's Pro C#is an excellent book that covers both the C# language and much of the .NET libraries.

Apress 的 Pro C#是一本出色的书,涵盖了 C# 语言和大部分 .NET 库。

回答by ArjanZuidhof

There is a whole world of (free) dev tools available, that will help you out in all kinds of scenario's. Start out with Scott Hanselman's Developer Tool List. If you don't want to use Visual Studio, you can also try the (fast!) SharpDevelop, an IDE for C#, VB.NET (and Boo, but you might not know that one). Good luck!

有一整套(免费)开发工具可用,可以帮助您解决各种情况。从Scott Hanselman 的 Developer Tool List 开始。如果您不想使用 Visual Studio,您还可以尝试(快速!)SharpDevelop,这是一个用于 C#、VB.NET(和 Boo,但您可能不知道那个)的 IDE。祝你好运!

回答by Artur Carvalho

Answering more the topic than the specific questions I would say to have a look at .NET Book Zeroby Charles Petzold.

回答比具体问题更多的主题,我会说看看Charles Petzold 的.NET Book Zero

回答by Sean Kearon

You could also take a look at SharpDevelop. The shame about the otherwise excellent express editions of Visual Studio is that they are crippled regarding addins, so you don't get any unit testing. SharpDevelop lacks some of the features of the full version but has excellent support for things like NUnit, NCover, and even some refactoring (but nothing like Resharper, unfortunately). Most excellently you have Subversion integration for source control. I'm starting to use Subversion now and love it to bits.

你也可以看看SharpDevelop。其他优秀的 Visual Studio Express 版本的耻辱在于它们在插件方面是残缺的,因此您没有进行任何单元测试。SharpDevelop 缺少完整版的一些功能,但对 NUnit、NCover 甚至一些重构(但不幸的是没有像 Resharper 这样的东西)有很好的支持。最棒的是你有用于源代码控制的 Subversion 集成。我现在开始使用 Subversion 并且非常喜欢它。

I spent six years in Delphi and loved it to bits. The main strength for me of C# over Object Pascal is the syntax - it's much cleaner. There are some really great new features in C# 3 (Dotnet 3.5) - checkout LINQ. However, in terms if you are coding for pleasure, I wouldn't say there's any drivingreason to convert to Dotnet. You'd probably find it more likely to be able to find work in Dotnet than Delphi these days.

我在 Delphi 度过了六年,并且非常喜欢它。对我来说,C# 比 Object Pascal 的主要优势在于语法——它更简洁。C# 3 (Dotnet 3.5) 中有一些非常棒的新特性 - checkout LINQ。但是,如果您是为了娱乐而编码,我不会说转换到 Dotnet有任何驱动理由。您可能会发现,如今在 Dotnet 中比在 Delphi 中找到工作的可能性更大。

HTH

HTH

Sean

肖恩

回答by Rob Cooper

I find the development rate of the .NET Framework and the IDE (Visual Studio) phenomenal.. We are getting some really cool stuff coming out of Redmond, and they seem to be ever-increasing in their responsiveness to user feedback, which I think is awesome :)

我发现 .NET Framework 和 IDE (Visual Studio) 的开发速度惊人。我们从 Redmond 得到了一些非常酷的东西,而且它们对用户反馈的响应能力似乎不断提高,我认为太棒了 :)

There are a lot of good resources already listed. Obviously extensive use of Stack Overflow would be a suggestion I now always make to new developers.

已经列出了很多好的资源。显然,广泛使用 Stack Overflow 是我现在总是向新开发人员提出的建议。

I personally find O'Reilly "Head Rush/First" books to be some of the best software tutorial books on the market.. I always had good results with them. However, I have not read their C# bookmyself.

我个人认为 O'Reilly 的“Head Rush/First”书籍是市场上最好的软件教程书籍之一。我总是用它们取得很好的效果。但是,我自己还没有读过他们的C# 书

回答by Steen

Having only developed programs with .NET through Mono(using C# and IronPython), my experience with IDEs only involve Emacsand experiments with Eclipseand MonoDevelop. Mono is free (as in open source), but incomplete with respect to the reference implementation that is Microsoft .NET. The Mono implementation is nevertheless still large enough for enterprise(y) applications.

我仅通过Mono(使用 C# 和IronPython)使用.NET 开发程序,因此我在 IDE 方面的经验仅涉及Emacs以及使用EclipseMonoDevelop 进行的实验。Mono 是免费的(就像在开源中一样),但相对于 Microsoft .NET 的参考实现而言是不完整的。尽管如此,Mono 实现对于企业(y)应用程序来说仍然足够大。

In the IDE corner: At a talk with Anders Hejlsberg (one of the designers of C#), he mentioned that using the .NET platform without code-completion stopped even seasoned testers in their tracks. After that I decided to try out Eclipse and MonoDevelop, both of which have code-completion, but found their abstraction layers prevented me from understanding how the framework really functions. So I returned to Emacs and used the (veryslow) online documentation. I know a lot of developers swear by Visual Studio and can't imagine coding against .NET without the assistance it gives. I just can't get used to parenting in software :).

在 IDE 角落:在与 Anders Hejlsberg(C# 的设计者之一)的一次谈话中,他提到使用 .NET 平台而无需代码完成,即使是经验丰富的测试人员也无法进行测试。之后我决定尝试 Eclipse 和 MonoDevelop,它们都有代码完成功能,但发现它们的抽象层使我无法理解框架的真正功能。所以我回到了 Emacs 并使用了(非常慢的)在线文档。我知道很多开发人员都对 Visual Studio 发誓,并且无法想象在没有它提供的帮助的情况下针对 .NET 进行编码。我只是不习惯在软件中养育孩子:)。

One thing is sure though, and that is that you should go buy Peter Seestofts "C# Precisely"; with luck, it's the only general-purpose book on C# you'll ever need. And when/if your page ever loads on MSDN, the documentation you'll find there is also very good. Peter Seestoft has also written a generic collections library for c#: C5.

不过有一件事是肯定的,那就是你应该去购买Peter Seestofts "C# Precisely";幸运的是,它是您需要的唯一一本关于 C# 的通用书籍。当/如果您的页面加载到 MSDN 上时,您会发现那里的文档也非常好。Peter Seestoft 还为 c# 编写了一个通用集合库:C5

As to what strengths .NET has: It's big (as Java). It's integrated into the Windows platform. A lot of jobs are available if you can use the .NET framework.

至于 .NET 有什么优势:它很大(就像 Java)。它已集成到 Windows 平台中。如果您可以使用 .NET 框架,则有很多工作可用。

But - as always - I would recommend Python for great fun when unpaid. (You can also access the .NET framework through IronPython, a Microsoft implementation of CPython).

但是 - 和往常一样 - 我会推荐 Python 在没有报酬的情况下非常有趣。(您还可以通过 IronPython(CPython的 Microsoft 实现)访问 .NET 框架)。

Good luck and have fun! Steen

祝好运并玩得开心点!斯蒂恩

回答by Peter C

Training videos, tutorials and documentation at: www.asp.net/learn.

培训视频、教程和文档,请访问:www.asp.net/learn

回答by FlySwat

Even if you progress beyond the express edition, the standard version of VS is only $250.

即使你超越了 Express 版,VS 的标准版也只需 250 美元。

That's less than most people pay for coffee and food in a month...Just don't eat.

这比大多数人在一个月内支付的咖啡和食物的费用要少……只是不要吃。

=)

=)