C#
王翼鹏
略懂皮毛、略知一二、一知半解闯江湖!不求代码精湛,但求没有BUG!不求大富大贵,但求两餐温饱!
展开
-
DES加密 java与.net可以相互加密解密的方法
我.net/Java程序员。今天让C#和Java数据加密交互。通过这个方法可以实现java和C#相互加密与解密 并能保持解密出来一致。 话不多说,看代码 C#代码如下 package web_test; import javax.crypto.Cipher; import javax.crypto.SecretKey; import javax.crypto.SecretKeyFact...转载 2020-04-24 11:21:12 · 441 阅读 · 0 评论 -
C#自定义类型
result.IsSuccess = true; result.Data = new { data = list, total = count };原创 2017-11-06 15:03:41 · 2641 阅读 · 0 评论 -
C#动态执行一段字符串
using System; using System.Reflection; using System.Globalization; using Microsoft.CSharp; using System.CodeDom; using System.CodeDom.Compiler; using System.Text; namespace ConsoleApplication1 {原创 2012-12-28 14:29:52 · 815 阅读 · 0 评论 -
c# 使用HttpWebRequest发送http请求
private string HttpPost(string Url, string postDataStr) { HttpWebRequest request = (HttpWebRequest)WebRequest.Create(Url); request.Method = "POST"; request.原创 2017-08-14 17:18:31 · 8336 阅读 · 0 评论 -
c#异步执行一段代码
Thread th = new Thread( delegate() { try {原创 2016-11-10 14:05:11 · 1661 阅读 · 0 评论 -
json序列化
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Text.RegularExpressions; using System.Web.Script.Serialization; namespace MxWeiXinPF.Common { pu原创 2016-04-18 09:34:09 · 472 阅读 · 0 评论 -
c# 将秒数转换成时,分,秒的方法
TimeSpan ts = new TimeSpan(0, 0,Convert.ToInt32( duration)); string str = ""; if (ts.Hours > 0) { str = ts.Hours.ToString()原创 2016-01-05 17:07:52 · 28265 阅读 · 3 评论 -
c#拓展方法将datatable转换成实体
public static class Extensions { /// /// 扩展方法,IEnumerable转换为IList /// /// /// 带转换的数据 /// /// /// /// 传递过来的SelectListItem,如请选择…… /// public static IList ToSelectListItem(this IEnumerable data, Expressi原创 2015-10-10 10:30:44 · 1382 阅读 · 0 评论 -
C#生成验证码
以下是c#生成验证码的代码。 using System; using System.Collections.Generic; using System.Drawing; using System.Drawing.Drawing2D; using System.Drawing.Imaging; using System.IO; using System.Linq; using System.Tex原创 2015-11-11 14:33:00 · 450 阅读 · 0 评论 -
c#rsa 非对称加密
本文介绍c#的非对称加密算法使用,公钥加密,私钥解密转载 2015-11-10 17:57:12 · 2031 阅读 · 0 评论
分享