public class DesEncrypt { private static byte[] _rgbKey = ASCIIEncoding.ASCII.GetBytes(Constant.DesKey.Substring(0, 8));//自定义密钥 private static byte[] _rgbIV = ASCIIEncoding.ASCII.GetBytes...
public class DesEncrypt { private static byte[] _rgbKey = ASCIIEncoding.ASCII.GetBytes(Constant.DesKey.Substring(0, 8));//自定义密钥 private static byte[] _rgbIV = ASCIIEncoding.ASCII.GetBytes...
/// <summary> /// Linq to xml示例 /// </summary> public class LinqToXml { /// <summary> /// 创建XML文件 /// <... private static void CreateXmlFile(string xmlPath)
Mysql 安装找它 ...docker 安装 docker run --name claymysql -p 13306:3306 -v /home/mysql/custom:/etc/mysql/conf.d -v /home/mysql/data:/var/lib/mysql -e MYSQL_ROOT_PASSWORD=123456 -d mysql:5.7 ...
#region 3.0出了个匿名类 { Console.WriteLine("*****************匿名类**************"); Student student = new Student() { Id = 1, Name = "Richard", Age = 25, ClassId = 2 ... //-----------------
/// <summary> /// 图片类 /// </summary> public class ImageHelper { private static string ImagePath = ConfigurationManager.AppSettings["ImagePath"];... private static string VerifyPath = ...
一:装饰器实现AOP /// <summary> /// 装饰器模式实现静态代理 /// AOP 在方法前后增加自定义的方法 /// </summary> public class DecoratorAOP ... public static void Show() ... Password = "1231231231
public partial class frmSSQ : Form { public frmSSQ() { InitializeComponent(); this.btnStart.Enabled = true; this.btnStop.Enabled = false; } #region Data /// <summary>....
/// <summary> /// Linq To Object /// .NetFramework3.0的一个非常重大的改变 /// Linq专门用来做数据处理 /// </summary> public class LinqShow { #region Data Init private List<...Student&
委托 委托太常见了,能灵活运用可以使你在编程中游刃有余。 简单说它就是一个能把方法当参数传递的对象,而且还知道怎么调用这个方法,同时也是粒度更小的“接口”(约束了指向方法的签名) 委托的简单使用 ...
public class ServiceDal : IServiceDal { public static readonly string Customers = ConfigurationManager.ConnectionStrings["Customers"].ToString();//获取配置文件中连接字符串 /// <...
/// <summary> /// RSA ECC /// 可逆非对称加密 /// 非对称加密算法的优点是密钥管理很方便,缺点是速度慢。 /// </summary> public class RsaEncrypt { /// <summary>... ///
#region 扩展方法 3.0 { //普通方法调用 Student student = new Student() { Id = 1, Name = "Mr.zhang", Age = 25, ClassId = 2 };... student.Study();... ExtendMethod.StudyPractise(student);...
#region 基本内存状态变化 using (TencentClassRoomContext context = new TencentClassRoomContext()) { SysUser user5 = context.SysUsers.Find(5); Company company = context.Companies.Find(1);...
in 查询 var list = dbContext.Users.Where(u => new int[] { 1, 2, 3, 5, 7, 8, 9, 10, 11, 12, 14, 17 }.Contains(u.Id));//in查询 foreach (var user in list) { Console.WriteLine(user.Name);...
/// <summary> /// C#8 /// </summary> public class SharpEightInfo { public static void Show() { #region 默认接口方法 CustomInterface interface1 = new CustomClass(); ...
#region 设置自己的schema的handler services.AddAuthenticationCore(options => options.AddScheme<MyHandler>("myScheme", "demo myScheme")); #endregion #region 支持 policy 认证授权的服务 ...
一:相关依赖文件 public class CustomControllerActivator : IControllerActivator { /// <summary> /// 这里就是创建控制器的方法 /// </summary> ...param name="context">... public object Create...
一:Unity容器相关知识介绍 IOC控制反转:传统开发,上端依赖(调用/指定)下端对象,会有依赖 把对下端对象的依赖转移到第三方容器(工厂+配置文件+反射) 能够程序拥有更好的扩展性 DI依赖注入:依赖注入就是能做到...
#region SaveChanges自带事务 ///1. Context 包含的能对数据库的操作肯定不是对一个表的操作;可以操作多个动作 ///2. SaveChanges以后,默认启动事务,会一次性提交对数据库的所有操作; 要么都成功 要么都失败 ...
/// <summary> /// 不可逆加密 /// 1 防止被篡改 /// 2 防止明文存储 /// 3 防止抵赖,数字签名 /// </summary> public class MD5Encrypt ... /// MD5加密,和动网上的16/32位MD5加密结果相同, ...
第一部分:基础的使用 Nuget引入程序包 QuartZ 三大核心对象 IScheduler:时间轴 单元 盒子 在这里进行任务配置 IJobDetail:描述具体做什么事情,定时任务执行的动作 ITrigger:时间策略,按照什么频率来执行 ...
public interface IXTContainer { void RegisterType<TFrom, TTo>(LifeTimeType lifeTimeType = LifeTimeType.Transient); T Resolve<T>(); } /// <summary>... public class XTCon
触发的事件函数 public static void Publisher() { Phone phone = new Phone() { Id = 123, Name = "华为P9", Price = 2499 }; // 执行订阅 ... //价格变动会触发订阅者里的函数 .../// 事件的发布
#region 表达式链接 { Expression<Func<People, bool>> lambda1 = x => x.Age > 5; Expression<Func<People, bool>> lambda2 = x => x.Id > 5; Expression<...
/// <summary> /// 这里是一个标准的中间件的定义 /// </summary> public class HotlinkingPreventionMiddleware { ... private readonly RequestDelegate _next;... private readonly IConfiguration _...
课程目标 1.触发器 2.游标&&视图&&函数 3.字段类型&&字段可空 4.统计字段&...Microsoft SQL Server Management Studio 18 2012以上;...一....是一个特殊的存储过程,是由数据库自己在某种场景下...
数据库自身优化 优化①:增加次数据文件,设置文件自动增长(粗略数据分区) 1.1:增加次数据文件 从SQL SERVER 2005开始,数据库不默认生成NDF数据文件,一般情况下有一个主数据文件(MDF)就够了,但是有些大型...
public class SerializeHelper { /// <summary> /// 二进制序列化器 /// </summary> public static void BinarySerialize() ... //使用二进制序列化对象 string fileName = Path.Combine(Constant....
C#/.NET【新阁教育】C#.NET全栈开发高级VIP班 网盘 开发 .NET C# .Net Core