摘要: public class DepthClone<T> { public virtual T Clone() { var memory = new MemoryStream(); var formatter = new BinaryFormatter(); formatter.Serialize(me 阅读全文
posted @ 2021-02-20 16:31 imnet 阅读(175) 评论(0) 推荐(0)
摘要: public static InvoiceType GetInvoiceType(string fapdm) { // 一些例外发票代码 var someCode = new string[] { "144031539110", "131001570151", "133011501118", "11 阅读全文
posted @ 2021-02-20 16:30 imnet 阅读(560) 评论(0) 推荐(0)
摘要: [Serializable] public abstract class SerializableBase<T> { protected static T FromJson(string json) { return JsonConvert.DeserializeObject<T>(json); } 阅读全文
posted @ 2021-02-20 16:28 imnet 阅读(209) 评论(0) 推荐(0)
摘要: 上测试代码 using System; public static class Program { public static void Main(string[] args) { Console.WriteLine("{0}: {1} byte(s) scope:[{2}-{3}]", typeo 阅读全文
posted @ 2021-02-20 16:26 imnet 阅读(2792) 评论(0) 推荐(1)
摘要: public static class PostHelper { private static readonly string DefaultUserAgent = "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, li 阅读全文
posted @ 2021-02-20 16:25 imnet 阅读(374) 评论(0) 推荐(0)
摘要: public static class SocialCreditCodeHelper { // 白名单,解决部分地区的社会信用代码不符合国家相关标准导致的判定错误 private static IList<string> _whiteList = new List<string>() { //此处代 阅读全文
posted @ 2021-02-20 16:23 imnet 阅读(279) 评论(0) 推荐(0)
摘要: 其中,\s 表示空格,{1,} 表示连续1个以上的空格,RegexOptions.IgnoreCase 表示不区分大小写。 public static class StringHelper { public static string ReplaceSeriesString(string str) 阅读全文
posted @ 2021-02-20 16:20 imnet 阅读(368) 评论(0) 推荐(0)