随笔分类 - .net framework
摘要:How do I check if a type is a subtype OR the type of an object? To check if a type is a subclass of another type in C#, it's easy: typeof (SubClass).I
阅读全文
摘要:https://docs.microsoft.com/en-us/dotnet/api/system.io.fileattributes?view=netframework-4.7.2 读取FileAttributes 在桌面新建一个文件file-to-delete.txt,设置只读属性。先删除,然
阅读全文
摘要:https://docs.microsoft.com/en-us/dotnet/api/system.environment.newline?view=netframework-4.7.2 https://stackoverflow.com/questions/1015766/difference-
阅读全文
摘要:https://stackoverflow.com/questions/17755559/could-not-load-file-or-assembly-myassembly-xmlserializers There's an answer already here. Apparently this
阅读全文
摘要:The easiest way is to use [XmlEnum] attribute like so: [Serializable] public enum EnumToSerialize { [XmlEnum("1")] One = 1, [XmlEnum("2")] Two = 2 } T
阅读全文
摘要:https://docs.microsoft.com/en-us/dotnet/api/system.web.ui.webcontrols.placeholder?view=netframework-4.7 Using Panel or PlaceHolder https://stackoverfl
阅读全文
摘要:默认有38个section 1 System.Web.Configuration.SecurityPolicySection2 System.Web.Configuration.AuthenticationSection3 System.Web.Configuration.ProfileSectio
阅读全文
摘要:对于一个空的配置文件,默认自带的sectiongroups 默认有10个section节点 1 ConfigurationSectionGroupName=system.runtime.serializationConfigurationSectionGroupNameType=System.Run
阅读全文
摘要:工作原理: 1.在没有指定logname,仅仅指定了source的时候。 1.1 source存在 在写eventlog的时候,首先去找source,如果找到的话,就往这个source所在的log里面写日志。 1.2 source 不存在 (直接绑定Application作为logname,然后自动
阅读全文
摘要:https://docs.microsoft.com/en-us/dotnet/standard/parallel-programming/how-to-write-a-simple-parallel-foreach-loop 使用并行可能存在的问题,很重要 Potential Pitfalls i
阅读全文
摘要:https://docs.microsoft.com/en-us/dotnet/api/system.serviceprocess.servicebase.onstart?view=netframework-4.7.1#System_ServiceProcess_ServiceBase_OnStar
阅读全文
摘要:Could not load file or assembly 'System.Web.Mvc, Version=3.0.0.0, Culture=neutral, PublicKeyToken=31bf3856ad364e35' or one of its dependencies. The sy
阅读全文
摘要:dotnet RSAParameters Struct https://docs.microsoft.com/zh-cn/dotnet/api/system.security.cryptography.rsaparameters?view=netframework-4.7 RSACryptoServ
阅读全文
Found conflicts between different versions of the same dependent assembly that could not be resolved
摘要:https://stackoverflow.com/questions/24772053/found-conflicts-between-different-versions-of-the-same-dependent-assembly-that-c While the other response
阅读全文
摘要:GetHitTest https://stackoverflow.com/questions/7762397/how-do-i-click-a-usercontrols-child-in-designer @Bradley: thanks for pointing me in the right d
阅读全文
摘要:https://stackoverflow.com/questions/4963667/filestream-vs-differences-streamwriter What is different between FileStream and StreamWriter in dotnet? A
阅读全文
摘要:https://docs.microsoft.com/en-us/dotnet/api/system.web.ui.webcontrols.repeater?view=netframework-4.7 A data-bound list control that allows custom layo
阅读全文
摘要:https://docs.microsoft.com/en-us/dotnet/api/system.web.ui.control.findcontrol?view=netframework-4.7 FindControl(String) FindControl(String) Searches t
阅读全文
摘要:https://msdn.microsoft.com/en-us/library/system.security.cryptography.hmacsha256(v=vs.110).aspx Computes a Hash-based Message Authentication Code (HMA
阅读全文
摘要:http://stackoverflow.com/questions/4317479/func-vs-action-vs-predicate The difference between Func and Action is simply whether you want the delegate
阅读全文