摘要: public static bool IsUrl(this string str) { if (str.IsNullOrEmpty()) return false; string pattern = @"^(http|https|ftp|rtsp|mms):(\/\/|\\\\)[A-Za-z0-9 阅读全文
posted @ 2016-08-16 11:23 方金 阅读(394) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 序列化对象为xml字符串 /// </summary> /// <param name="obj">要序列化的对象</param> /// <returns>xml格式字符串</returns> public static string Serialize(thi 阅读全文
posted @ 2016-08-16 11:15 方金 阅读(862) 评论(0) 推荐(0) 编辑
摘要: /// <summary> /// 获取远程浏览器端 IP 地址 /// </summary> /// <returns>返回 IPv4 地址</returns> public static string GetIPAddress() { string userHostAddress = HttpC 阅读全文
posted @ 2016-08-16 10:32 方金 阅读(246) 评论(0) 推荐(0) 编辑