上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 56 下一页
摘要: 还是用委托的方式。 public partial class Form1 : Form { public Form1() { InitializeComponent(); } private Form2 form2; private void ShowForm2() { Action action 阅读全文
posted @ 2023-11-20 09:30 double64 阅读(163) 评论(0) 推荐(0)
摘要: ``` DialogResult result = MessageBox.Show("确认关闭窗口?", "提示", MessageBoxButtons.YesNo, MessageBoxIcon.Question, 0, MessageBoxOptions.ServiceNotification) 阅读全文
posted @ 2023-07-29 23:44 double64 阅读(226) 评论(0) 推荐(0)
摘要: ``` CancellationTokenSource cancellationTokenSource = new CancellationTokenSource(); CancellationTokenSource cancellationTokenSource_1 = new Cancellat 阅读全文
posted @ 2023-07-28 23:39 double64 阅读(711) 评论(0) 推荐(1)
摘要: C# 对 List 元素排序有几种方法。 #### 方法一、使用Linq ``` List sortedList = list.OrderBy(o=>o.ID).ToList(); ``` 如果按降序排序,可以使用OrderByDescending方法: ``` List sortedList = 阅读全文
posted @ 2023-06-15 21:22 double64 阅读(820) 评论(0) 推荐(2)
摘要: ```cs using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp9 { clas 阅读全文
posted @ 2023-06-14 13:44 double64 阅读(459) 评论(0) 推荐(0)
摘要: ```cs class Program { static void Main(string[] args) { SaySomeThing saySomeThing_Hi = new SaySomeThing(); Console.WriteLine(saySomeThing_Hi.GetObj(). 阅读全文
posted @ 2023-06-09 23:53 double64 阅读(29) 评论(0) 推荐(0)
摘要: ```cs class Program { static void Main(string[] args) { Test test = new Test(); test.TestAsync(ShowRes); Console.WriteLine("没有阻塞…"); Console.ReadKey() 阅读全文
posted @ 2023-06-03 21:59 double64 阅读(43) 评论(0) 推荐(0)
摘要: using System; using System.Collections.Generic; using System.Threading; using System.Windows.Forms; namespace WindowsFormsApp1 { public partial class 阅读全文
posted @ 2023-05-13 18:19 double64 阅读(844) 评论(0) 推荐(0)
摘要: ▲ 这样简单样式属性修改 属性修改: ▲ 根据需要,多行选择是否开启。 表头: 给表增加数据: listViewUsers.Items.Clear(); // ... ListViewItem listItem = new ListViewItem(user.ssName); listItem.Su 阅读全文
posted @ 2023-05-12 17:52 double64 阅读(419) 评论(0) 推荐(1)
摘要: static void Main(string[] args) { TEST tEST = new TEST { Hello = 100 }; TEST_ST tEST_ST = (TEST_ST)tEST; Console.WriteLine(tEST_ST.Hello); tEST_ST = n 阅读全文
posted @ 2023-05-08 15:24 double64 阅读(30) 评论(0) 推荐(0)
上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 56 下一页