合集-C# 学习日记
摘要:// 该C#代码使用.net8 WinForm using System.Diagnostics; namespace OnlyOne { public partial class Form1 : Form { public Form1() { InitializeComponent(); } pr
阅读全文
摘要:// 新建一个cs文件,放在你的项目内,可以调用这个方法。 using System; using System.Diagnostics; // 调用程序 namespace Shutdown { class Proces { public static void Progress(string P
阅读全文
摘要:namespace ConsoleApp_DriveInfo { internal class Program { static void Main(string[] args) { Driveinfo(); } static void Driveinfo() { DriveInfo driveIn
阅读全文
摘要:// 参考来源: https://learn.microsoft.com/zh-cn/dotnet/api/system.io.directory?view=net-8.0 // Directory 公开用于通过目录和子目录进行创建、移动和枚举的静态方法。 此类不能被继承。 /* * Directo
阅读全文
摘要:// 获取网络时间方法 public static DateTime GetNetworkTime() { try { //default Windows time server //用域名获取时候用这里 //string ntpServer = "time.windows.com"; // NTP
阅读全文
摘要:class Program { static void Main(string[] args) { bool isBreak = false; ConsoleColor colorBack = Console.BackgroundColor; ConsoleColor colorFore = Con
阅读全文
摘要:## 参考链接 WinForm中利用委托和事件实现子窗体传值给父窗体_winform子窗体向父窗体传值-CSDN博客 C#跨窗体传值的几种方法分析(很详细) - xh6300 - 博客园 (cnblogs.com) ## Form1 父窗口 // .Net8 Winform using static
阅读全文
摘要:// .net4.8 Winform using System; using System.Collections.Generic; using System.ComponentModel; using System.Data; using System.Drawing; using System.
阅读全文
摘要:// .net8 Winform using System; using System.Runtime.InteropServices; using System.Threading.Tasks; using System.Windows.Forms; namespace Async_Cancell
阅读全文
摘要:// .net8环境 Winform namespace GUI_Async_await异步报告_供参考_ { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void but
阅读全文
摘要:// Stream MS HelpManual: https://learn.microsoft.com/zh-cn/dotnet/api/system.io.stream?view=net-8.0 // FileStream 官方手册: https://learn.microsoft.com/zh
阅读全文
摘要:// 官方文档: https://learn.microsoft.com/zh-cn/dotnet/api/system.io.compression.gzipstream?view=net-8.0 /* GZipStream介绍 * 此类表示 gzip 数据格式,该格式使用行业标准算法进行无损文件
阅读全文
摘要:// 官方帮助 Console: https://learn.microsoft.com/zh-cn/dotnet/api/system.io.filesystemwatcher?view=net-8.0 // 官方帮助 WPF: https://learn.microsoft.com/zh-cn/
阅读全文
摘要:/// 参考链接 https://learn.microsoft.com/zh-cn/dotnet/api/system.io.fileinfo?view=net-8.0 // 需要直到的是 fileinfo 主要用于查看文件信息, 搭配FileStream或StreamWrite可以操作文件IO,
阅读全文