摘要:
static void TestCallerMemberName() { CallerDemo("CallFilePath,CallerMemberName,CallerLineNumber"); } static void CallerDemo(string msg,[CallerFilePath 阅读全文
摘要:
static void PropertyPatternDemo() { string url = "https://devblogs.microsoft.com/dotnet/do-more-with-patterns-in-c-8-0/"; bool result = ShouldAllow(ne 阅读全文
摘要:
1.install-package System.Text.Json 2. static void SystemTextJsonJsonSerializerDemo() { var obj = new { Id = 1, Name = "Fred", Age = 34 }; string jsonV 阅读全文
摘要:
The new feature is only available in C# 8 or greater,so add below statement in csproj file <LangVersion>8</LangVersion> <PropertyGroup> <Configuration 阅读全文
摘要:
using System; using System.Collections.Generic; using System.IO; using System.Security.Cryptography; using System.Security.Principal; using System.Tex 阅读全文
摘要:
static void M2ClassDemo() { M2Class m2 = new M2Class(10); m2.PrintTime(); } public class M2Class { static int M2Value=0; static readonly M2Class m2Obj 阅读全文
摘要:
static void TestDictionaryInSensitive() { try { var comparer = StringComparer.OrdinalIgnoreCase; Dictionary<string, string> dic = new Dictionary<strin 阅读全文
摘要:
alter table AdventureWorks2019.sales.SalesOrderDetail add IsValid bit not null constraint IsValid_Default_Constraint Default 1 with values; This will 阅读全文
摘要:
xmlns:i="clr-namespace:System.Windows.Interactivity;assembly=System.Windows.Interactivity" xmlns:ii="http://schemas.microsoft.com/expression/2010/inte 阅读全文
摘要:
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using Excel = Microsoft.Office.Int 阅读全文