
C#
紫酱
我不想说什么
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
C# 前后台交互的加密和解密 顺带一个MD5加密
var base = new Base64(); var result2 = base.decode(code); function Base64() { // private property _keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="; // public method for encoding ...原创 2021-05-06 09:28:54 · 748 阅读 · 0 评论 -
asp core 日志
TargetFramework 指定的框架 AspNetCoreHostingModel托管模式 : Inprocess表示,我们将使用in-process hosting model托管模型。这就意味着,我们将要在IIS Worker Process中托管我们的ASP.NET Core应用程序。也就是w3wp.exe. (默认)OutOfProcess表示,我们将使用out-of-process hosting model.在后面的章节中,我将会谈到这个Irocess以及Out...原创 2021-04-11 18:31:51 · 110 阅读 · 0 评论 -
c# 序列化和反序列化
/// <summary> /// 序列化 /// </summary> /// <param name="target"></param> /// <returns></returns> public static string Serializable(object target) { using (Memor...原创 2020-11-23 13:47:40 · 151 阅读 · 0 评论 -
汉字转拼音和首字母
需要引入https://www.microsoft.com/zh-cn/download/details.aspx?id=15251微软的语言包 用到的是“CHSPinYinConv.msi”、双击安装成功后添加刚刚安装的语言包引用:ChnCharInfo.dll 该dll在安装路径主目录 /// <summary> /// 汉字转化为拼音首字母 /// </summary> /// <param name="str">汉字</param> ...原创 2020-10-22 10:46:45 · 149 阅读 · 0 评论 -
简单的删除本地文件
File.Delete(string) 注意占用原创 2020-09-22 10:24:10 · 387 阅读 · 0 评论 -
多个pdf合并到一个
public void mergePDFFiles() { out_path = Guid.NewGuid().ToString() + ".pdf"; List<PdfReader> readerList = new List<PdfReader>();//记录合并PDF集合 PdfReader reader; Rectangle rec = new Rectangl...原创 2020-09-22 10:23:03 · 135 阅读 · 0 评论 -
pdf拷贝到另一个pdf
string file = Guid.NewGuid().ToString() + ".pdf"; File.Copy(path, file);原创 2020-09-22 10:21:27 · 350 阅读 · 0 评论 -
EXCEL转pdf
Workbook book = new Workbook(path); string file = Guid.NewGuid().ToString() + ".pdf"; book.Save(file, SaveFormat.Pdf);原创 2020-09-22 10:19:56 · 162 阅读 · 0 评论 -
简单的word转pdf
Aspose.Words.Document documents = new Aspose.Words.Document(path); string file = Guid.NewGuid().ToString() + ".pdf"; documents.Save(file, Aspose.Words.SaveFormat.Pdf);原创 2020-09-22 10:19:07 · 211 阅读 · 0 评论 -
可用的图片转pdf
string file = basePath + Guid.NewGuid().ToString() + ".pdf"; var document = new Document(PageSize.A4, 25, 25, 25, 25); using (var streams = new FileStream(file, FileMode.Create, FileAccess.Write, FileShare.None)) ...原创 2020-09-22 10:17:56 · 137 阅读 · 0 评论