- 2020-06-19
Parameters.Add和Parameters.AddWithValue的区别(Difference between Parameters.Add and Parameters.AddWithVa
I read the MSDN documentation and examples here and I know that the correct syntax for a Paramters.Add call is : command.Parameters.Add("@ID 阅读全文>> - 2020-06-19
了解AttachThreadInput - 分离失去焦点(Understanding AttachThreadInput - detaching lose focus)
i got a little problem fully understanding AttachThreadInput. I know it's "connecting" the message queue of 2 threads, which (what i want to do 阅读全文>> - 2020-06-19
使用WrapPanel每行项目数量指定(Specifying number of items per row using a WrapPanel)
I'm attempting to create an application that looks much like the Windows 8 Metro UI with the tiles.. right now if you click on a tile I have an 阅读全文>> - 2020-06-15
当我们需要UseShellExecute设置为True?(When do we need to set UseShellExecute to True?)
// // Summary: // Gets or sets a value indicating whether to use the operating system shell // to start the process 阅读全文>> - 2020-06-15
数字签名与CryptVerifySignature(Digital signature with CryptVerifySignature)
I want to implement digital signature app using CryptVerifySignature. I've written this code(with help of MSDN example): #define Check(conditi 阅读全文>> - 2020-06-15
我如何可以将图像设置为在C#中的透明背景,而无需使用Bitmap.MakeTransparent()?(How can I set an image to have a transparent bac
I want to set an image to have a transparent background, but I do not want to replace all pixels of a specific colour with transparency. To be 阅读全文>> - 2020-06-15
C#OleDbParameter与Access日期时间查询(C# OleDbParameter with Access DateTime query)
I have the following query that works from inside Access or from C# as an OleDbCommand: SELECT Table1.ProductType, Sum(Table1.ProductsSold) F 阅读全文>> - 2020-06-15
删除关闭文件(Delete on close files)
Language used: C# Theory: I want to create a file with the flag FileOptions.DeleteOnClose in a temporary folder. The file is successfully cr 阅读全文>> - 2020-01-15
C#多线程与异步
1、什么是异步同步 如果一个方法被调用,调用者需要等待该方法被执行完毕之后才能继续执行,则是同步。 如果方法被调用后立刻返回,即使该方法是一个耗时操作,也能立刻返回到调用者,调用者不需要等待该方法,则称之为异步。 异步编程需要用到Task任务函数,不返回值的任务由 System.Thr 阅读全文>> - 2020-01-15
【5min+】 秋名山的竞速。 ValueTask 和 Task
系列介绍 简介 【五分钟的dotnet】是一个利用您的碎片化时间来学习和丰富.net知识的博文系列。它所包含了.net体系中可能会涉及到的方方面面,比如C#的小细节,AspnetCore,微服务中的.net知识等等。 场景 您可以在下班坐地铁的时候,拿出手机逛一逛博客园,利用短短的五分 阅读全文>> - 2020-01-15
一个C#开发者重温Java的心路历程
前言 我们都知道软件开发是工科,不是理科;本质上和电工、钳工是一样的。 也就是说,软件技术成长也与电工、钳工的技术成长是一样的,靠的是练,而不是学。 所以,很多时候,我们称应届大学生是一张白纸,啥也不会。 不论他在学校学的多好,都没用,因为他没练过,不能干活;同理,不论他在学校学的多差 阅读全文>> - 2019-12-30
关于C#异步编程你应该了解的几点建议
这篇文章我们来讨论下关于C#异步编程几个不成文的建议,希望对你写出高性能的异步编程代码有所帮助。注:本文的很多内容都是学习《Effective C#》的总结。 尽量不要编写返回值类型为void的异步方法 在通常情况下,建议大家不要编写那种返回值类型为void的异步方法,因为这样做会破 阅读全文>> - 2019-12-16
C#异步编程看这篇就够了
随着.NET Core的流行,相信你现在的代码中或多或少的会用到async以及await吧!毕竟已成标配。那么我们为什么要用async以及await呢?其实这是微软团队为我们提供的一个语法糖,让我们不用996就可以轻松的编写异步代码,并无太过神奇的地方。那么,问题来了,什么是异步?异步 阅读全文>> - 2019-12-16
[译]C#8.0中一个使接口更加灵活的新特性-默认接口实现
9月份的时候,微软宣布正式发布C#8.0,作为.NET Core 3.0发行版的一部分。C#8.0的新特性之一就是默认接口实现。在本文中,我们将一起来聊聊默认接口实现。 提前说下: 这实际上是一种基于特性的编程技术,可以在几个无关类之间进行方法的重用。不过的确有点反认知,毕竟接口方法 阅读全文>> - 2019-12-16
C# Lazy Loading
前言 按需加载对象延迟加载实际是推迟进行创建对象,直到对其调用后才进行创建初始化,延迟(懒加载)的好处是提高系统性能,避免不必要的计算以及不必要的资源浪费。 常规有这些情况: 对象创建成本高且程序可能不会使用它。 例如,假定内存中有具有 Orders 属性的 Customer 对象, 阅读全文>>