随笔分类 - C#
摘要:转载:http://www.cnblogs.com/abatei/archive/2008/02/04/1064102.html 使用泛型创建只读集合 问题 您希望类中的一个集合里的信息可以被外界访问,但不希望用户改变这个集合。 解决方案 使用ReadOnlyCollection<T>包装就很容易实
阅读全文
摘要:问题: A binary gap within a positive integer N is any maximal sequence of consecutive zeros that is surrounded by ones at both ends in the binary repres
阅读全文
摘要:1. 查询接口:建议使用IEnumerable 更新、创建接口:不要使用IEnumerable(maybe 接口会重复调用);建议使用可以讲结果保存到内存中的类型(like:IList、IDictionary) var result = _serviceItemConsumeRecordSvc.Ad
阅读全文
摘要:model定义,使用DisplayAttribute enum定义,使用DisplayAttribute 解析DisplayAttribute for class 解析DisplayAttribute for enum 辅助model定义
阅读全文
摘要:原文链接 Getting Started with React - An Overview and Walkthrough Tutorial Prerequisites There are a few things you should know in advance before you star
阅读全文
摘要:https://devblogs.microsoft.com/dotnet/ :_NET Blog https://docs.microsoft.com/zh-cn/learn/ :Microsoft Learn | Microsoft Docs https://mvp.microsoft.com/
阅读全文
摘要:Announcing ML.NET 1.0
阅读全文
摘要:Introducing .NET 5 .NET 5 = .NET Core vNext .NET 5 is the next step forward with .NET Core. The project aims to improve .NET in a few key ways: Produc
阅读全文
摘要:enum 转为 string:EnumMember & StringEnumConverter enum array 转为string array:StringEnumConverter & JsonProperty dll引用:
阅读全文
摘要:1.以管理员身份运行vs命令提示符 2.运行 fuslogvw 3.以管理员身份运行Powershell To Enable:(确保fusion日志的文件夹D:\FusionLog\的存在) To Disable 类似,注册表设置: 目的,实现功能: Fusion Log How to enable
阅读全文
摘要:原文 So...you're seeing a FileNotFoundException, FileLoadException, BadImageFormatException or you suspect an assembly loading failure? Try the steps be
阅读全文
摘要:原文链接 Could you be missing the loaded assembly from your configuration file? Ensure you have something similar to the following within your web.config.
阅读全文
摘要:原文链接 This article discusses ways to avoid problems of type identity that can lead to InvalidCastException, MissingMethodException, and other errors. T
阅读全文
摘要:error info: 解决方案:在.exe.config文件中配置Newtonsoft.Json所用版本 原因:Newtonsoft.Json所引用的版本不统一 .net framework中dependentassembly的介绍 .net framework中assemblyIdentity的
阅读全文
摘要:error msg: HttpClient throws TaskCanceledException on timeout HttpClient is throwing a TaskCanceledException on timeout in some circumstances. This is
阅读全文
摘要:error msg: System.Threading.Tasks.TaskCanceledException: The operation was canceled. > System.IO.IOException: Unable to read data from the transport c
阅读全文
摘要:介绍: 所有有关本地化的数据获取,都是从统一的一个资源文件中获取 1.创建虚拟类、资源文件,用于作为本地化数据的获取源 2.Configure localization:支持view、data annotation、mvc 3.Localization middleware: 默认排序为 可以更改顺
阅读全文
摘要:官网文档 nuget地址 创建资源文件 添加资源文件 实施策略 配置本地化 本地化中间件 使用 视图本地化 DataAnnotations 本地化 Make the app's content localizable
阅读全文
摘要:错误、警告的说明: 示例一: 严重性:警告 代码:MSB3106 说明 :程序集强名称“C:\Users\$(computerName)\.nuget\packages\$(packageName)\$(version)\lib\netstandard$(version)\$(componentNa
阅读全文
摘要:http request 相关 相关方法
阅读全文