上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 37 下一页
摘要: using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.IO.Ports; using Sys 阅读全文
posted @ 2024-09-17 18:40 CSF践行 阅读(1360) 评论(0) 推荐(0)
摘要: 1, 拖入计时器timer1 private void Form1_Load(object sender, EventArgs e) { timer1.Interval = 1000;//设置计时器间隔时间, 单位ms timer1.Start();//启动计时器 } private void ti 阅读全文
posted @ 2024-09-16 10:55 CSF践行 阅读(163) 评论(0) 推荐(0)
摘要: 1, 新建窗口frm_Login using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.Li 阅读全文
posted @ 2024-09-15 22:34 CSF践行 阅读(227) 评论(0) 推荐(0)
摘要: /*哈希表,表示键/值对的集合,这些键/值对根据键的哈希代码进行组织。它的每个元素都是一个存储在DictionaryEntry对象中的键/值对。键不能为空引用,但值可以。哈希表的构造函数有多种,这里介绍两种最常用的。*/ //(1)使用默认的初始容量、加载因子、哈希代码提供程序和比较器来初始化Has 阅读全文
posted @ 2024-08-31 19:17 CSF践行 阅读(51) 评论(0) 推荐(0)
摘要: 第一步: 扫码枪设置 1, 基恩士扫码枪IP地址设置 2, 扫码枪EIP设置 第二步: PLC设置及编程 1,EDS文件导入 2, EIP配置 3, 程序 VAR x触发读码:BOOL; 接收数据长度:UINT; 接收数据:ARRAY[0..127] OF BYTE; str接收数据:STRING; 阅读全文
posted @ 2024-08-28 10:49 CSF践行 阅读(5419) 评论(0) 推荐(0)
摘要: 1, ArrayList集合的遍历与数组类似,都可以使用foreach语句 string[] str1 = { "a", "b", "c" ,"d","e","f"}; ArrayList List = new ArrayList(str1); foreach (var item in List) 阅读全文
posted @ 2024-08-25 22:31 CSF践行 阅读(91) 评论(0) 推荐(0)
摘要: 1 Clear()方法 Clear()方法用来从ArrayList中移除所有元素,语法格式如下。 string[] str1 = { "a", "b", "c" }; ArrayList List = new ArrayList(str1); List.Clear(); 2 Remove()方法 R 阅读全文
posted @ 2024-08-25 22:19 CSF践行 阅读(684) 评论(0) 推荐(0)
摘要: ArrayList提供了3个构造器,通过这3个构造器可以有3种声明方式。 (1)默认构造器,会以默认大小(16位)初始化内部数组。构造器格式如下。 ArrayList List = new ArrayList();//实例化一个ArrayList,命名为List; for (int i = 0; i 阅读全文
posted @ 2024-08-25 22:05 CSF践行 阅读(195) 评论(0) 推荐(0)
摘要: //数组的遍历: foreach /*说明:foreach循环不必像for循环那样要预先知道数组或集合的细节,确定循环次数和通过下标索引查找当前对象,因此当集合容量大,维数高时能极大地提升效率。但foreach循环里不能随便添加或者删除元素,因此需要更改集合内容时不能使用foreach语句。*/ i 阅读全文
posted @ 2024-08-25 21:00 CSF践行 阅读(31) 评论(0) 推荐(0)
摘要: //创建一个控制台应用程序,使用二维数组存储火车票信息,输入车次和姓名后,模拟预订火车票功能,代码如下: string train = "", destination = "", StartTime = "";//声明3个字符串: 车次,车次信息, 出发时间; string[] 标题 = { "车次 阅读全文
posted @ 2024-08-25 14:26 CSF践行 阅读(51) 评论(0) 推荐(0)
上一页 1 ··· 3 4 5 6 7 8 9 10 11 ··· 37 下一页