C#6.0特性:点击打开链接
C#7.0特性:点击打开链接
在C#6.0中 使用async与await 关键字很容易的实现异步编程,而且代码可读性比较高,很容易理解。这里举例的是从数据库中读取10w行数据。 下面看代码:
xaml:
<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
xmlns:local="clr-namespace:WpfApplication1"
mc:Ignorable="d"
Title&