人人人人人人人人人人人人

上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 35 下一页
摘要: 模拟10个线程,每个线程模拟100次取钱: 其实就是相当于1000个人来同时取钱。当然实际情况是取钱的人分布在不同的地区的取款机取钱。同一个取款机只能一个人操作。 关键是要保证取钱的余额要准确,不能在多人同时操作的时候计算失误,于是要在计算余额的时候锁住。lock关键作用在于此。 static vo 阅读全文
posted @ 2021-06-17 14:46 wgscd 阅读(192) 评论(1) 推荐(0) 编辑
摘要: public interface IService { void DoSomething(ref string a); void DoSomething2(out string a); } [TestMethod] public void TestRefPara() { var service = 阅读全文
posted @ 2021-06-09 17:35 wgscd 阅读(100) 评论(0) 推荐(0) 编辑
摘要: 测试: public class UnitTest1 { [TestMethod] public void TestMethod1() { Mock<TestClass> moc = new Mock<TestClass>(); moc.Setup(x => x.GetItem(It.IsAny<i 阅读全文
posted @ 2021-06-09 15:37 wgscd 阅读(6607) 评论(0) 推荐(0) 编辑
摘要: public static Size ScreenSize { get { //screen resolution var height = DisplayInformation.GetForCurrentView().ScreenHeightInRawPixels; var width = Dis 阅读全文
posted @ 2021-06-07 14:23 wgscd 阅读(97) 评论(0) 推荐(0) 编辑
摘要: <DataGrid > <DataGrid.CellStyle> <Style TargetType="DataGridCell"> <Style.Triggers> <Trigger Property="IsSelected" Value="True"> <Setter Property="Bac 阅读全文
posted @ 2021-05-12 14:31 wgscd 阅读(1993) 评论(0) 推荐(0) 编辑
摘要: <Page x:Class="Win2DDemo.MainPage" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.microsoft.com/winfx/2006/ 阅读全文
posted @ 2021-04-09 16:58 wgscd 阅读(124) 评论(0) 推荐(0) 编辑
摘要: 自己摸索的,注册表判断是否安装微软Edge浏览器: bool checkInstalledMsEdge() { try { using(var ieKey = Registry.LocalMachine.OpenSubKey(@"SOFTWARE\Microsoft\Windows\CurrentV 阅读全文
posted @ 2021-04-03 14:09 wgscd 阅读(435) 评论(0) 推荐(0) 编辑
摘要: 假设自定义一个用户控件用以在父容器Grid里拖动/移动: <UserControl x:Class="App6.Pic" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas 阅读全文
posted @ 2021-03-17 14:38 wgscd 阅读(66) 评论(0) 推荐(0) 编辑
摘要: 出现题目的异常,多是引用第三方控件引起的。 在NEW时,需要初始化该对象。 AxESACTIVEXLib.AxESActiveX ax = new AxESACTIVEXLib.AxESActiveX(); ((System.ComponentModel.ISupportInitialize)(th 阅读全文
posted @ 2021-03-10 11:27 wgscd 阅读(806) 评论(0) 推荐(0) 编辑
摘要: Sub Macro1() Debug.Print "999" Dim FilePath, strData FilePath = "C:\Git\Test\JenProjects.json" Open FilePath For Input As #1 Do While Not EOF(1) Line 阅读全文
posted @ 2021-03-02 16:12 wgscd 阅读(669) 评论(0) 推荐(0) 编辑
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 35 下一页