随笔分类 -  C#

摘要:using System.Security.Cryptography; using System.Text; using Xunit.Abstractions; namespace xUnit.Tests { /// <summary> /// /// </summary> public class 阅读全文
posted @ 2024-06-18 16:38 潇潇与偕 阅读(307) 评论(0) 推荐(0) 编辑
摘要:一、创建CompareFieldAttribute标识要比较的字段 二、比较操作类 三、单元测试 1、定义测试类 2、单元测试 3、测试结果 测试结果中输出了所有差异字段的相关信息 四、附件下载地址 下载地址 阅读全文
posted @ 2018-06-29 11:04 潇潇与偕 阅读(4853) 评论(0) 推荐(1) 编辑
摘要:using System; using System.Collections.Generic; using System.Data; using System.Reflection; namespace BT.Preservation.Models { public static class ExtendMethod { /// /// Data... 阅读全文
posted @ 2018-06-29 10:22 潇潇与偕 阅读(25124) 评论(0) 推荐(3) 编辑
摘要:using System; using System.Collections.Generic; using System.Data; using System.Reflection; namespace Common { public static class ExtendMethod { // DateTime --> long public ... 阅读全文
posted @ 2018-06-29 10:20 潇潇与偕 阅读(474) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Security.Cryptography; using System.Text; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace UnitTest.OtherTest { [TestClass] public class AesClass {... 阅读全文
posted @ 2018-04-11 16:53 潇潇与偕 阅读(26952) 评论(3) 推荐(0) 编辑
摘要:using System; using System.IO; using System.Security.Cryptography; using System.Text; using Microsoft.VisualStudio.TestTools.UnitTesting; namespace UnitTest.OtherTest { [TestClass] public cl... 阅读全文
posted @ 2018-04-11 16:39 潇潇与偕 阅读(512) 评论(0) 推荐(0) 编辑
摘要:public class ConvertDBCAndSBC { /// 半角转成全角 /// 半角空格32,全角空格12288 /// 其他字符半角33~126,其他字符全角65281~65374,相差65248 /// /// /// ... 阅读全文
posted @ 2017-09-05 11:22 潇潇与偕 阅读(1044) 评论(0) 推荐(0) 编辑
摘要:一、使用场景 在使用前后端分离的框架中常常会进行传输数据相互加密解密以确保数据的安全性,如web Api返回加密数据客户端或web端进行解密,或者客户端或web端进行加密提交数据服务端解密数据等等。 二、Javascript源码 /* CryptoJS v3.1.2 code.google.com/ 阅读全文
posted @ 2016-11-15 15:13 潇潇与偕 阅读(890) 评论(0) 推荐(0) 编辑
摘要:public static void DownFileStream(MemoryStream ms, string fileName) { if (ms !=Stream.Null) { if (HttpContext.Current.Request.UserAgent != null && ... 阅读全文
posted @ 2016-08-15 16:17 潇潇与偕 阅读(698) 评论(1) 推荐(0) 编辑
摘要:using System; using System.Text; using EMS.Domains.Core; using System.Web.Mvc; using Json.Net; using Util.Webs; using Json = Util.Json; namespace EMS.MvcUI.Base { public class FilterExceptionAtt... 阅读全文
posted @ 2016-08-03 13:43 潇潇与偕 阅读(4477) 评论(0) 推荐(0) 编辑
摘要:public ActionResult excelPrint() { HSSFWorkbook workbook = new HSSFWorkbook();// 创建一个Excel文件 HSSFSheet sheet = workbook.createSheet();// 创建一个Excel的Sheet sheet.createFreezePane(1,... 阅读全文
posted @ 2016-08-01 14:09 潇潇与偕 阅读(12454) 评论(0) 推荐(0) 编辑
摘要:一:反射的定义 审查元数据并收集关于它的类型信息的能力。元数据(编译以后的最基本数据单元)就是一大堆的表,当编译程序集或者模块时,编译器会创建一个类定义表,一个字段定义表,和一个方法定义表等。 System.reflection命名空间包含的几个类,允许你反射(解析)这些元数据表的代码 System 阅读全文
posted @ 2016-04-12 16:14 潇潇与偕 阅读(186) 评论(0) 推荐(0) 编辑
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Threading; using System.Net; names 阅读全文
posted @ 2016-04-06 10:20 潇潇与偕 阅读(289) 评论(0) 推荐(0) 编辑
摘要:一、导出数据格式 二、实现代码 /// <summary> /// 导出经费统计excel表格 /// </summary> /// <param name="taskid"></param> /// <param name="taskname"></param> /// <returns></re 阅读全文
posted @ 2016-03-10 20:58 潇潇与偕 阅读(3189) 评论(0) 推荐(1) 编辑
摘要:using System; namespace EMC.Core { /// <summary> /// 金额转换为大写 /// </summary> public class EcanRMB { /// <summary> /// 转换人民币大小金额 /// </summary> /// <par 阅读全文
posted @ 2016-03-10 17:40 潇潇与偕 阅读(412) 评论(0) 推荐(0) 编辑
摘要:public FileResult ExportExcel() { var sbHtml = new StringBuilder(); sbHtml.Append("<table border='1' cellspacing='0' cellpadding='0'>"); sbHtml.Append 阅读全文
posted @ 2016-03-10 14:31 潇潇与偕 阅读(298) 评论(0) 推荐(0) 编辑
摘要:public ActionResult DownloadFile(string id) { var fileinfo = CommonAnnexService.Get(id); if (fileinfo.StatusValue... 阅读全文
posted @ 2015-12-07 16:31 潇潇与偕 阅读(2120) 评论(0) 推荐(0) 编辑
摘要:1.1、Web Service基本概念Web Service也叫XML Web Service WebService是一种可以接收从Internet或者Intranet上的其它系统中传递过来的请求,轻量级的独立的通讯技术。是:通过SOAP在Web上提供的软件服务,使用WSDL文件进行说明,并通过UD... 阅读全文
posted @ 2014-12-16 17:08 潇潇与偕 阅读(1396) 评论(0) 推荐(0) 编辑
摘要:这个问题我一步一步来给你回答:随着计算机语言的发展,现分为机器语言、低级语言和高级语言:1.机器语言是计算机最原始的语言,是由0和1的代码构成,cpu在工作的时候只认识机器语言,即0和1的代码。2.汇编语言,即为一种低级语言,它用人类容易记忆的语言和符号来表示一组0和1的代码,例如AND代表加法。3... 阅读全文
posted @ 2014-12-15 20:18 潇潇与偕 阅读(4556) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示