C#
super晴天
这个作者很懒,什么都没留下…
展开
-
MVC ,C# datatable转Json
1.第一种就是笨方法了,循环Datatable,自己拼接字符串 2.使用Newtonsoft.Json.JsonConvert.SerializeObject转换 1).首先添加引用 using Newtonsoft.Json.Converters; 2).传入一个Datatable转换成json public string GetJsonData()原创 2014-12-17 15:54:02 · 983 阅读 · 0 评论 -
ADO.NET事务的实现
using System; using System.Collections.Generic; using System.Data; using System.Data.Common; using System.Data.SqlClient; using System.Linq; using System.Text; public bool Delete(int id) { bool f原创 2014-12-03 14:10:01 · 389 阅读 · 0 评论 -
C#去除HTML标签
public static string ReplaceHtml(string html, int length = 0) { string strText = System.Text.RegularExpressions.Regex.Replace(html, "]+>", ""); strText = System.Text.RegularExpressions.Regex.R原创 2014-12-22 11:22:55 · 442 阅读 · 0 评论 -
C#获取本机公网IP
using System; using System.Net; using System.Text.RegularExpressions; namespace GetInternetIP { public class GetInternetIP { public static string GetIP() { using原创 2014-12-23 11:22:27 · 664 阅读 · 0 评论 -
C#获取指定网页源码
/// /// 获取网页源码 /// /// 链接 /// 编码 /// public static string GetSource(string Url, string CharSet = "GB2312") { using (WebClient myWebClient = new WebClient()) { using (Stream myStream原创 2014-12-23 11:13:25 · 396 阅读 · 0 评论 -
C# Int16,Int32和Int64的区别
Int16 值类型表示值介于 -32768 到 +32767 之间的有符号整数,对应short Int32 值类型表示值介于 -2,147,483,648 到 +2,147,483,647 之间的有符号整数,对应int Int64 值类型表示值介于 -9,223,372,036,854,775,808 到 +9,223,372,036,854,775,807 之间的整数,对应long原创 2014-12-31 10:01:57 · 9664 阅读 · 1 评论 -
VSS2005 出现 Unable to Open User Login File 问题
只需要将共享里面-权限-everyone的完全控制勾选上,确定就行了原创 2015-03-23 13:36:40 · 761 阅读 · 0 评论 -
Win8.1 装不上iis解决方案
1以“管理员身份运行”命令提示符即cmd,在命令提示符下输入下列字符串:dism.exe /online /enable-feature /featurename:NetFX3 /Source:C:\sources\sxs注意空格 运行之后,安装iis秒装原创 2015-03-26 09:11:03 · 887 阅读 · 0 评论