摘要:
一、Thread (System.Threading) 1.前台线程和后台线程 只要有一个前台线程在运行,应用程序的进程就在运行,直到所有前台线程完成其任务为止。在默认情况下,用 Thread类创建的线程是前台线程。线程池中的线程总是后台线程。在用 Thread类创建线程时,可以设置 IsBackg
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(393)
推荐(0)
摘要:
Enumerable.Range(0, 20).Select(i => { long x = 1; for (int j = 1; j <= i; j++) { x *= j; } Console.WriteLine(i + "计算完成"); return x; }); 当你尝试运行上面的代码,会发
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(930)
推荐(0)
摘要:
一、XML的序列化 using System.Xml.Serialization; https://www.cnblogs.com/KeithWang/archive/2012/02/22/2363443.html 1.建立序列化测试对象 [XmlRootAttribute("City", Name
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(213)
推荐(0)
摘要:
1.个人类Person public class Person { public Person(string fName, string lName) { this.FirstName = fName; this.LastName = lName; } public string FirstName
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(348)
推荐(0)
摘要:
using System.Collections.Generic; using System.Configuration; //有可能可以using但不能用,需重新添加引用 /// <summary> /// 针对配置文件的读写操作 (App.config) /// ps:key和name都不区分大
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(688)
推荐(0)
摘要:
前言 什么是NuGet? NuGet是.NET的软件包管理器。NuGet客户端工具提供了生成和使用软件包的功能。NuGet Gallery是所有软件包作者和使用者都使用的中央软件包存储库。 包的安装和卸载 (以Newtonsoft.Json举例) 1.控制台 安装:Install-Package N
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(445)
推荐(0)
摘要:
前言:摘抄至 Sql server从入门到精通 密码:yskt 一、事务的概念 事务是由一系列语句构成的逻辑工作单元。事务和存储过程等批处理有一定程度上的相似之处,通常都是为了完成一定业务逻辑而将一条或者多条语句“封装”起来,使它们与其他语句之间出现个逻辑上的边界,并形成相对独立的一个工作单元。 当
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(464)
推荐(0)
摘要:
几个基本类型都有TryParse方法,将object 自动识别类型和转换 using System.Reflection; public static bool TryParse<T>(object val, out T t) { t = default(T); if (val == null) {
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(212)
推荐(0)
摘要:
占位符 格式化 结果 描述 string.Format("{0,4}", 0) 0 不满足指定位数的情况下,在前置插入空格 string.Format("{0,-4}", 0) 0 不满足指定位数的情况下,在后置插入空格 数字格式化 格式化 结果 格式符 描述 string.Format("{0:0
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(263)
推荐(0)
摘要:
一、效果Gif 二、Mark块 public partial class Block : UserControl { public Block() { this.Size = new Size(60, 60); MinFontSize = 4; MaxFontSize = 40; } /// <su
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(360)
推荐(0)
摘要:
一、窗体 绿色边框框住的区域:屏幕橙色边框框住的区域:窗体黄色边框框住的区域:窗体工作区 1.边框 窗体的FormBorderStyle可以设置以下的值,每个值导致窗体的边框的宽度不一样,但是可以发现的是左、右、下边框的宽度是一样的: // // 摘要: // 指定窗体的边框样式。 [ComVisi
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(2491)
推荐(2)
摘要:
using System; using System.ComponentModel; using System.Drawing; using System.Runtime.InteropServices; using System.Windows.Forms; namespace WindowsFo
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(511)
推荐(0)
摘要:
一、数据模型 Database First (数据库优先):先创建数据库表,然后自动生成EDM文件,EDM文件生成模型类 Model First (模型优先):先创建Edm文件,Edm文件自动生成模型类和数据库;Code First(代码优先):自己写模型类,然后生成数据库,没有EDM。 这里我们现
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(156)
推荐(0)
摘要:
using System; using System.Collections.Generic; using System.Diagnostics; using System.Drawing; using Spire.Pdf; using Spire.Pdf.AutomaticFields; usin
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(720)
推荐(0)
摘要:
using System; using System.ComponentModel; using System.Reflection; namespace PropertyGridUse { public class PropertyAttribute<T> { /// <summary> ///
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(702)
推荐(0)
摘要:
1、效果图 2、导入导出 using System; using System.Collections.Generic; using System.IO; using System.Reflection; using System.Text; using System.Windows.Forms;
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(1588)
推荐(0)
摘要:
一、比特币 比特币(Bitcoin)的概念最初由中本聪在2008年11月1日提出,并于2009年1月3日正式诞生 。根据中本聪的思路设计发布的开源软件以及建构其上的P2P网络。比特币是一种P2P形式的虚拟的加密数字货币。点对点的传输意味着一个去中心化的支付系统。 与所有的货币不同,比特币不依靠特定货
阅读全文
posted @ 2022-04-12 22:46
Bridgebug
阅读(746)
推荐(0)