文章分类 -  C#

摘要:C#图像处理(各种旋转、改变大小、柔化、锐化、雾化、底片、浮雕、黑白、滤镜效果) 一、各种旋转、改变大小注意:先要添加画图相关的using引用。//向右旋转图像90°代码如下:private void Form1_Paint(object sender, System.Windows.Forms.P... 阅读全文
posted @ 2015-07-31 19:43 HETUAN 阅读(4107) 评论(0) 推荐(1)
摘要:System.BadImageFormatException : 未能加载文件或程序集“xxxxx.xxxxx, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null”或它的某一个依赖项。试图加载格式不正确的程序。原因是项目CPU默认X86我的系... 阅读全文
posted @ 2015-07-29 23:35 HETUAN 阅读(581) 评论(0) 推荐(0)
摘要:我这里主要是为了一个序列号在线生成,注册软件的服务提供公钥和私钥,用到了RSA算法。此为数据加密的应用,RSA算法另外一个作用是数字签名,先不研究。知识储备:什么是非对称加密?所谓的非对称加密,就是指加密和解密使用不同的密钥的一类加密算法。这类加密算法通常有两个密钥A和B,使用密钥A加密数据得到的密... 阅读全文
posted @ 2015-07-29 17:18 HETUAN 阅读(1254) 评论(0) 推荐(0)
摘要:NewtonSoft.Json对需要转为JSON字符串的对象的NULL值以及DBNull是直接处理成NULL的。对DBNull 的JSON字符串对应需要空字符串。/// /// 对DBNull的转换处理,此处只写了转换成JSON字符串的处理,JSON字符串转对象的未处理 /// ... 阅读全文
posted @ 2015-06-10 12:33 HETUAN 阅读(2206) 评论(0) 推荐(0)
摘要:首先补充一点,Json.Net是支持序列化和反序列化DataTable,DataSet,Entity Framework和NHibernate的.我举例说明DataTable的序列化和反序列化.创建一个DataTable对象,如下: DataTable dt = new DataTable(); ... 阅读全文
posted @ 2015-06-09 19:24 HETUAN 阅读(6620) 评论(0) 推荐(0)
摘要:SELECT ABS(CAST(CAST(NEWID() AS VARBINARY) AS INT)) AS [RandomNumber]select (ABS(CHECKSUM(NewId())) % 14 +1)select floor(15 * RAND(convert(varbinary... 阅读全文
posted @ 2015-05-25 17:20 HETUAN 阅读(450) 评论(0) 推荐(0)
摘要:using System;using System.Data;using System.Text;using System.Collections.Generic;using System.Reflection;using System.Data.Common;using System.Collec... 阅读全文
posted @ 2015-05-20 21:46 HETUAN
摘要:using System; using System.Collections.Generic;using System.Linq;using System.Web;using System.Xml;using System.IO; namespace Helper{ public class... 阅读全文
posted @ 2015-05-20 21:41 HETUAN 阅读(536) 评论(0) 推荐(0)
摘要:using System;using System.Data;using System.Configuration;using System.Web;using System.Web.Security;using System.Web.UI;using System.Web.UI.WebContro... 阅读全文
posted @ 2015-05-08 12:43 HETUAN 阅读(1506) 评论(0) 推荐(0)
摘要:using System; using System.Data; using System.Xml; using System.Data.SqlClient; using System.Collections; using System.Configuration;namespace BookDAL... 阅读全文
posted @ 2015-04-02 18:42 HETUAN 阅读(798) 评论(0) 推荐(0)
摘要:1.静态变量和非静态变量的区别? 2.const 和 static readonly 区别? 3.extern 是什么意思? 4.abstract 是什么意思? 5.internal 修饰符起什么作用? 6.sealed 修饰符是干什么的? 7.override 和 overload 的区别? 8.... 阅读全文
posted @ 2015-02-06 12:40 HETUAN 阅读(136) 评论(0) 推荐(0)
摘要:public void ProcessRequest(HttpContext context) { context.Response.Clear(); context.Response.Buffer = true; //... 阅读全文
posted @ 2015-01-27 12:25 HETUAN 阅读(786) 评论(0) 推荐(0)
摘要:internal sealed class program { public static void Main() { Console.WriteLine(ChineseToPYAbbreviation("你好,我就要拼音首字母").ToUpper());... 阅读全文
posted @ 2015-01-27 09:18 HETUAN 阅读(165) 评论(0) 推荐(0)
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Text.RegularExpressions;public class PinYin{ //定义拼音区... 阅读全文
posted @ 2015-01-21 16:59 HETUAN 阅读(226) 评论(0) 推荐(0)