摘要:
今天看到一段代码,try中有return语句,后面还有一个finally,不知道执行过程是什么样的。于是来试验了一下。 1.try和catch中有return时,finally里面的语句会被执行吗 我们可以来分别看看 (1)执行try中的return时 public class tryDemo { 阅读全文
posted @ 2022-02-24 19:34
江境纣州
阅读(80)
评论(0)
推荐(0)
摘要:
异步的目标不是为了让程序运行的更快,而是为了让资源物尽其用。如果你同步运行,wait()等,都会阻塞当前线程。当前线程不得不等待其他线程的任务完成后再继续执行,在这期间,当前线程没有任何用处,除了等待。这在客户端固然不算什么,客户端的计算能力足够,顶多是界面卡死一小会儿而已,但是在计算密集的服务器应 阅读全文
posted @ 2022-02-24 18:46
江境纣州
阅读(215)
评论(0)
推荐(0)
摘要:
using StackExchange.Redis; using System; using System.Collections.Concurrent; using System.Collections.Generic; using System.Configuration; using Syst 阅读全文
posted @ 2022-02-24 18:34
江境纣州
阅读(98)
评论(0)
推荐(0)
摘要:
using System; using System.Collections.Generic; using System.Linq; using System.Threading.Tasks; using Newtonsoft.Json; using StackExchange.Redis; nam 阅读全文
posted @ 2022-02-24 18:33
江境纣州
阅读(394)
评论(0)
推荐(0)
摘要:
1、ZipCompressionUtil using HRS.Lib.Comm.IO; using ICSharpCode.SharpZipLib.Checksums; using ICSharpCode.SharpZipLib.Zip; using System; using System.Col 阅读全文
posted @ 2022-02-24 18:10
江境纣州
阅读(28)
评论(0)
推荐(0)
摘要:
1、值类型数组比较 int[] dataA = new int[] { 0, 1, 2, 3, 4, 5 }; int[] dataB = new int[] { 0, 1, 2, 4, 3, 5 }; List<int> dataC = new List<int> { 0, 1, 2, 3, 4, 阅读全文
posted @ 2022-02-24 15:58
江境纣州
阅读(95)
评论(0)
推荐(0)
摘要:
var str = "abcDEF"; switch (str) { case string x when x.StartsWith("abc"): Console.WriteLine("abc"); break; case string x when x.StartsWith("efc"): Co 阅读全文
posted @ 2022-02-24 14:54
江境纣州
阅读(38)
评论(0)
推荐(0)

浙公网安备 33010602011771号