随笔分类 -  编程 / C#

摘要:1.绑定新建类文件(使用BindableBase方式) public class sample:BindableBase { private double blendPreVolume; /// <summary> /// 混匀前吸体积 /// </summary> public double Bl 阅读全文
posted @ 2025-03-06 09:29 echo-efun 阅读(1) 评论(0) 推荐(0) 编辑
摘要:System.Windows.Markup.XamlParseException:““设置属性“Prism.Mvvm.ViewModelLocator.AutoWireViewModel”时引发了异常。”,行号为“8”,行位置为“14”。” MissingMethodException: 没有为该对 阅读全文
posted @ 2024-08-13 14:35 echo-efun 阅读(300) 评论(0) 推荐(0) 编辑
摘要:1.ConcurrentDictionary ConcurrentDictionary 并发字典,保证多线程情况下的安全性 Dictionary 非线程安全集合 using System.Collections.Concurrent; class Program { static void Main 阅读全文
posted @ 2024-08-09 10:16 echo-efun 阅读(4) 评论(0) 推荐(0) 编辑
摘要:1.引用 using System; using System.Collections.Generic; using System.Linq; 2.打印一副扑克牌 static void Main(string[] args) { var pokers = from s in Suits() fro 阅读全文
posted @ 2020-12-19 16:13 echo-efun 阅读(172) 评论(0) 推荐(0) 编辑
摘要:IEnumerator接口:支持对非泛型集合的简单迭代,使得foreach可以遍寻集合 using System; using System.Collections; public class Family { private string husban = null; public string 阅读全文
posted @ 2020-12-17 16:14 echo-efun 阅读(114) 评论(0) 推荐(0) 编辑
摘要:Queue类将队列实现为循环数组。 queue对象实现了在一端插入并从另一端删除(即先进先出功能) 如存在多个CCD检测情况下,每个ccd检测结果信息存储到Queue中,最后一个ccd检测完成,然后发送数据到robot(plc)等,通过Queue的Dequeue()方法来达到先进先出功能 阅读全文
posted @ 2020-12-17 09:49 echo-efun 阅读(2930) 评论(0) 推荐(0) 编辑
摘要:1.列表创建 var names = new List<string> { "博客园", "cc", "efun" ,"zp"}; foreach (var name in names) { Console.WriteLine($"Hello {name.ToUpper()}!"); } Hello 阅读全文
posted @ 2020-12-17 09:11 echo-efun 阅读(247) 评论(0) 推荐(0) 编辑
摘要:1.浮点数 用于表示数量级可能非常大或者非常小的非整数; float:单精度浮点数表示用于存储值的二进制位数为32位 double:双精度浮点数相对于单精度浮点数而言,是其两倍;即表示用于存储值的二进制位数为64位 2.常见算数运算 int c=7/4; //若值不为整数,商取整 Console.W 阅读全文
posted @ 2020-12-16 16:03 echo-efun 阅读(1876) 评论(0) 推荐(0) 编辑
摘要:string str = " Hello dear "; Console.WriteLine($"{str} zp"); //等同于Console.WriteLine(str+" zp"); Console.WriteLine(str+" zp"); Console.WriteLine(str.Tr 阅读全文
posted @ 2020-12-16 09:41 echo-efun 阅读(185) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示