C# 演练C# Walkthroughs

演练提供有关常见方案的分步说明,这使它们成为了解产品或特定功能部分的良好开端。Walkthroughs give step-by-step instructions for common scenarios, which makes them a good place to start learning about the product or a particular feature area.

本部分包含指向 C# 线程演练的链接。This section contains links to C# programming walkthroughs.

本节内容In This Section

使用 Async 和 Await 访问 WebAccessing the Web by Using Async and Await
演示如何使用 asyncawait 创建异步解决方案。Shows how to create an asynchronous solution by using async and await.

用 C# 或 Visual Basic 创建一个 Windows 运行时组件,然后从 JavaScript 中调用该组件Creating a Windows Runtime Component in C# or Visual Basic and Calling it from JavaScript
演示如何创建 Windows 运行时类型,将其打包到 Windows 运行时组件中,然后从使用 JavaScript 为 Windows 生成的 Windows 8.x 应用商店Windows 8.x Store 应用调用该组件。Shows how to create a Windows Runtime type, package it in a Windows Runtime component, and then call the component from a Windows 8.x 应用商店Windows 8.x Store app that's built for Windows by using JavaScript.

Office 编程(C# 和 Visual Basic)Office Programming (C# and Visual Basic)
演示如何通过使用 C# 和 Visual Basic 创建 Excel 工作薄和 Word 文档。Shows how to create an Excel workbook and a Word document by using C# and Visual Basic.

创建并使用动态对象(C# 和 Visual Basic)Creating and Using Dynamic Objects (C# and Visual Basic)
演示如何创建动态公开文本文件内容的自定义对象、如何创建使用 IronPython 库的项目。Shows how to create a custom object that dynamically exposes the contents of a text file, and how to create a project that uses the IronPython library.

使用 Visual C# 创作复合控件Authoring a Composite Control with Visual C#
演示如何创建简单复合控件以及通过继承扩展其功能。Demonstrates creating a simple composite control and extending its functionality through inheritance.

创建利用 Visual Studio 设计时功能的 Windows 窗体控件Creating a Windows Forms Control that Takes Advantage of Visual Studio Design-Time Features
演示如何为自定义控件创建自定义设计器。Illustrates how to create a custom designer for a custom control.

使用 Visual C# 从 Windows 窗体控件继承Inheriting from a Windows Forms Control with Visual C#
演示如何创建简单的集成按钮控件。Demonstrates creating a simple inherited button control. 此按钮从标准 Windows 窗体按钮集成功能并公开自定义成员。This button inherits functionality from the standard Windows Forms button and exposes a custom member.

在设计时调试自定义 Windows 窗体控件Debugging Custom Windows Forms Controls at Design Time
描述如何调试自定义控件的设计时行为。Describes how to debug the design-time behavior of your custom control.

使用 Windows 窗体控件上的智能标记执行常规任务Performing Common Tasks Using Smart Tags on Windows Forms Controls
演示通常执行的部分任务,如在 TabControl 上添加或删除选项卡、将控件停靠在其父级,以及更改 SplitContainer 控件的方向。Demonstrates some of the commonly performed tasks such as adding or removing a tab on a TabControl, docking a control to its parent, and changing the orientation of a SplitContainer control.

用 C# 编写查询 (LINQ)Writing Queries in C# (LINQ)
演示用于编写 LINQLINQ 查询表达式的 C# 语言功能。Demonstrates the C# language features that are used to write LINQLINQ query expressions.

操作数据 (C#) (LINQ to SQL)Manipulating Data (C#) (LINQ to SQL)
描述在数据库中添加、修改以及删除数据的 LINQ to SQLLINQ to SQL 方案。Describes a LINQ to SQLLINQ to SQL scenario for adding, modifying, and deleting data in a database.

简单对象模型和查询 (C#) (LINQ to SQL)Simple Object Model and Query (C#) (LINQ to SQL)
演示如何创建实体类和筛选实体类的简单查询。Demonstrates how to create an entity class and a simple query to filter the entity class.

仅使用存储过程 (C#) (LINQ to SQL)Using Only Stored Procedures (C#) (LINQ to SQL)
演示如何使用 LINQ to SQL 来访问数据(仅执行存储过程)。Demonstrates how to use LINQ to SQL to access data by executing only stored procedures.

跨关系查询 (C#) (LINQ to SQL)Querying Across Relationships (C#) (LINQ to SQL)
演示如何使用 LINQ to SQLLINQ to SQL 关联来表示数据库中的外键关系。Demonstrates the use of LINQ to SQLLINQ to SQL associations to represent foreign-key relationships in a database.

用 C# 编写可视化工具Writing a Visualizer in C#
演示如何通过使用 C# 来编写简单的可视化工具。Shows how to write a simple visualizer by using C#.

部署示例和演练Deployment Samples and Walkthroughs
提供常见部署方案的分步示例。Provides step-by-step examples of common deployment scenarios.

请参阅See also