windows 我在哪里可以学习使用 C# 构建桌面应用程序?

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/1222420/
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-09-15 12:56:00  来源:igfitidea点击:

Where can I learn to build desktop applications with C#?

c#windowsmultithreadinguser-interfacedesktop

提问by Mark Canlas

My background is in web programming, mostly scripting with Perl. And I've recently been tasked with creating a desktop application. I'm wondering, where can one learn such concepts like making executables, what DLLs are for, how UIs are made, what threads are, etc.

我的背景是 Web 编程,主要是使用 Perl 编写脚本。我最近的任务是创建一个桌面应用程序。我想知道,在哪里可以学习诸如制作可执行文件、DLL 的用途、UI 的制作方式、线程是什么等概念。

I already have C# in Depth by Jon Skeet and C# in a Nutshell. I'm not worried about learning C# itself as much as I am learning about the workflows involved with using it on the desktop, things that are typically not done in web development.

我已经有了 Jon Skeet 的 C# in Depth 和 C# in a Nutshell。我并不担心学习 C# 本身,就像我正在学习在桌面上使用它所涉及的工作流程一样,这些工作通常不会在 Web 开发中完成。

Where should I look?

我应该在哪里看?

回答by Henk Holterman

One starting point would be WindowsClient.net(Microsoft). Lots of videos too. But maybe a little less suited for the absolute beginners.

一个起点是WindowsClient.net(Microsoft)。还有很多视频。但也许不太适合绝对的初学者。

回答by Daniel May

I only recently began learning C# myself - so I have quite the array(... ;) ) of links:

我最近才开始自己学习 C# - 所以我有相当多的链接数组(... ;) ):

C-Sharp Corner
CSharp Friends
CSharp Help
CSharp for absolute beginners - Very good
CSharp-online

C-Sharp Corner
CSharp 朋友
CSharp 帮助
CSharp 绝对初学者 - 非常好的
CSharp-online

Hope these help.

希望这些有帮助。

回答by Daniel May

For learning .NET application development (the only way people should write apps on windows boxes without requirements otherwise), start with the excellent book CLR Via C# by Jeffrey Richter. Save the first couple chapters for later. You'll get everything you need to know about C# and the 2.0 CLR, which is the basis of all .NET application development (in C#, anyhow.)

要学习 .NET 应用程序开发(人们应该在没有其他要求的情况下在 Windows 机器上编写应用程序的唯一方法),请从 Jeffrey Richter 的优秀书籍 CLR Via C# 开始。保存前几章供以后使用。您将获得有关 C# 和 2.0 CLR 的所有知识,它们是所有 .NET 应用程序开发的基础(无论如何在 C# 中)。

Once you're done with that, look into Linq. Linq covers a number of different language feature updates that came in 3.0 and 3.5 versions of the framework and their associated language updates. With the basics + a good understanding of Linq, you'll be creating decent apps in no time.

完成后,请查看 Linq。Linq 涵盖了框架 3.0 和 3.5 版本中的许多不同语言功能更新及其相关语言更新。通过基础知识 + 对 Linq 的良好理解,您将立即创建体面的应用程序。



Now, for which framework to use when constructing desktop apps: Winforms, or WPF.

现在,构建桌面应用程序时使用哪个框架:Winforms 或 WPF。

If you're a web developer, throw that old winforms crapaway and get with WPF. You'll feel much more comfortable with editing WPF forms in xaml than dealing with winforms.

如果您是Web 开发人员,请扔掉旧的winform垃圾并使用WPF。在 xaml 中编辑 WPF 表单比在 winform 中处理要舒服得多。

The best thing about WPF is the amazing databinding support. In fact, the WPF version of MVC is based on the databinding support in WPF.

WPF 最好的地方是惊人的数据绑定支持。实际上,MVC 的 WPF 版本是基于 WPF 中的数据绑定支持。

Check out the databinding cheat sheet, then learn about MVVM.

查看数据绑定备忘单,然后了解MVVM

回答by SanSolo

Old question, but i had to learn the same thing recently. I got the Visual C# 2012 step by step book. It teaches C# along with WPM. A good way to learn.

老问题,但我最近不得不学习同样的东西。我得到了 Visual C# 2012 一步一步的书。它与 WPM 一起教授 C#。一个很好的学习方式。

回答by Beska

Surprised no one has answered this yet:

没想到还没有人回答这个问题:

Programming Windows With C#, by Charles Petzold. Great book, easy read. Example based, but well organized for people that want to jump directly to a particular topic. He actually explains what's going on in each example, and why he's doing what he's doing. Really, a great resource.

使用 C# 编程 Windows,作者 Charles Petzold。好书,读起来轻松。基于示例,但组织良好,适合想要直接跳转到特定主题的人。他实际上解释了每个例子中发生了什么,以及他为什么要做他正在做的事情。真的,很好的资源。

(Note: this is a Windows Forms book...no WPF. Great for what it does, but if you're looking for WPF, look elsewhere.)

(注意:这是一本 Windows Forms 书籍……没有 WPF。它的功能很棒,但如果您正在寻找 WPF,请查看其他地方。)

回答by Steve

A good place to start would be to read MCTS Exam 70-546 Windows-based client development, then read 70-548 Designing and Developing Windows-based application. After that, you will probably need to read books focused on the specific technologies your app will use.

一个好的起点是阅读 MCTS 考试 70-546 基于 Windows 的客户端开发,然后阅读 70-548 设计和开发基于 Windows 的应用程序。之后,您可能需要阅读专注于您的应用程序将使用的特定技术的书籍。

回答by Amr Elgarhy

Check Windows Developer Training Resourcesand for sure you will need the help of a book and some videos

查看Windows 开发人员培训资源,您肯定需要一本书和一些视频的帮助

回答by Tony Borf

You can start by building a new project in Visual Studio and selecting the one of the project templates under C#\Windows. This will build a simple application so you can see the basic elements of the project. For example select 'Windows Forms Application' this will start you off with a form where you can drag and drop additional page elements. You can then use Intellisence to explore the options on the controls. Also load the sample projects so you can see working examples. That's how I would do it.

您可以首先在 Visual Studio 中构建一个新项目,然后选择 C#\Windows 下的项目模板之一。这将构建一个简单的应用程序,以便您可以查看项目的基本元素。例如,选择“Windows 窗体应用程序”,这将启动一个窗体,您可以在其中拖放其他页面元素。然后,您可以使用 Intellisence 探索控件上的选项。还加载示例项目,以便您可以查看工作示例。这就是我要做的。

回答by Brian Rasmussen

From what I hear and the little I have read of it Chris Sells's book on WinFormswould be useful that. If I am not mistaken he has also done a book on WPF, but I don't know if it is any good.

从我听到的和我读过的一点来看,Chris Sells 关于 WinForms 的书会很有用。如果我没记错的话,他也写过一本关于 WPF 的书,但我不知道它是否有什么好处。

回答by doc

I recommend you the C# Yellow Book(Rob Miles) it's free and very useful to learn C# basics fast.

我向您推荐C# 黄皮书(Rob Miles),它是免费的,对快速学习 C# 基础非常有用。