![](https://img-blog.csdnimg.cn/20201014180756930.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
C#
老子横刀向天笑
我是学习c#网络安全开发的,我也非常热爱这一行业,有兴趣的可以加我为好友,qq773173224.
展开
-
给所有数组扩展高阶函数
public static class EList { public static IEnumerable<T> Filter<T>(this IEnumerable<T> lt, Predicate<T> func) { foreach (T item in lt) { if (func(item)) {.原创 2021-03-04 10:18:43 · 85 阅读 · 1 评论 -
WordPress对应C#的MD5加密和解密
using System;using System.Collections.Generic;using System.Linq;using System.Security.Cryptography;using System.Text;namespace CriticalMass.WakePhone.Utility{ public class WpPassword { private static string itoa64 = "./0123456789ABC.原创 2021-03-01 18:36:30 · 589 阅读 · 4 评论 -
LUMBDA LEFT JOIN
var newlt = lt.GroupJoin(LtDes, a => a.UniqueCode, b => b.UniqueCode, (a, b) => new { a, b }).SelectMany(ab => ab.b.DefaultIfEmpty(), (x, y) => new{ a = x.a, b = y }).Select(s => new{ .原创 2021-01-26 12:37:01 · 121 阅读 · 0 评论 -
图片压缩
/// <summary> /// 图片压缩 /// </summary> /// <param name="iSource"></param> /// <param name="outPath"></param> /// <param name="precent"></param> public void Compress(System.Drawing.Image iSource, s.原创 2021-01-26 12:35:05 · 86 阅读 · 0 评论 -
类似于\U002D04\U002D19T17\U003A00\U003A00\U002D06\U003A00此种Ascii字符解码
string Ascii2String(string Info) { List<string> Items=Regex.Split(Info, @"\\u").ToList(); string Content = Items[0]; for (int i = 1; i < Items.Count; i++){ string Code = Items[i]; ...原创 2021-01-26 12:33:45 · 286 阅读 · 0 评论 -
HTTPHELPER过滤证书优化
using System;using System.Collections.Generic;using System.Text;using System.Net;using System.IO;using System.Text.RegularExpressions;using System.IO.Compression;using System.Security.Cryptography.X509Certificates;using System.Net.Security;using .原创 2021-01-26 12:31:14 · 138 阅读 · 0 评论 -
英文字符串相似度对比
usingEnglishStemmer;usingSystem;usingSystem.Collections.Generic;usingSystem.IO;usingSystem.Linq;usingSystem.Runtime.Serialization.Formatters.Binary;usingSystem.Text;usingSystem.Text.RegularExpressions;publicclassStringCompare{///...原创 2021-01-26 12:28:19 · 413 阅读 · 0 评论 -
过滤重复数据
//将数据集数据装入数组 public List GetList(DataTable dt) { List list = new List(); foreach (DataRow dr in dt.Rows) { list.Add(dr[0].ToString()); }原创 2013-07-12 16:37:11 · 754 阅读 · 0 评论 -
比较两个字符串并不区分大小写
string.Compare(SelectStr,"select * from "+TableName+"",true)原创 2013-05-14 18:21:59 · 942 阅读 · 0 评论 -
C#结构
结构是使用 struct 关键字定义的,与类相似,都表示可以包含数据成员和函数成员的数据结构。一般情况下,我们很少使用结构,而且很多人也并不建议使用结构,但作为.NET Framework 一般型別系统中的一个基本架构,还是有必要了解一下的。结构的特征:结构是一种值类型,并且不需要堆分配。结构的实例化可以不使用 new 运算符。在结构声明中,除非字段被声明为 const 或 static转载 2013-05-14 18:18:30 · 531 阅读 · 0 评论 -
C#_设置文件夹访问权限
C# 设置文件夹访问权限Applying permissions on folders/directories in Windows is one ofthe things developers want to control with their applications. Today we aregoing to look at how can we create such an appl转载 2013-05-14 18:24:29 · 1090 阅读 · 0 评论 -
使用COM组件读写word文档
引用组件:在菜单栏选择“项目”-“添加引用”,弹出的窗口中我们可以选择“COM”选项卡,找到Microsoft Office 12.0 Object Library(Office 2003/2007需要使用12.0版的,如果你使用的是Office 2000或者更低的版本,只要载入10.0版的就可以了),确定后引入先看一下Word对像模型Application :用来表现WORD应用程序,包原创 2013-05-14 18:21:15 · 3945 阅读 · 0 评论