上一页 1 ··· 90 91 92 93 94 95 96 97 98 ··· 120 下一页
摘要: 1.install-package system.text.json; 2. using System.Text.Json; using System.IO; 3. 1 static void SystemTextJsonDemo() 2 { 3 var obj = new[] 4 { 5 new 阅读全文
posted @ 2021-03-05 12:04 FredGrit 阅读(70) 评论(0) 推荐(0)
摘要: 1 class Program 2 { 3 static void Main(string[] args) 4 { 5 EventDemo(); 6 Console.ReadLine(); 7 } 8 9 static void EventDemo() 10 { 11 MathClass mc = 阅读全文
posted @ 2021-03-05 11:22 FredGrit 阅读(61) 评论(0) 推荐(0)
摘要: static void TestCallerMemberName() { CallerDemo("CallFilePath,CallerMemberName,CallerLineNumber"); } static void CallerDemo(string msg,[CallerFilePath 阅读全文
posted @ 2021-03-04 14:56 FredGrit 阅读(45) 评论(0) 推荐(0)
摘要: static void PropertyPatternDemo() { string url = "https://devblogs.microsoft.com/dotnet/do-more-with-patterns-in-c-8-0/"; bool result = ShouldAllow(ne 阅读全文
posted @ 2021-03-03 11:27 FredGrit 阅读(64) 评论(0) 推荐(0)
摘要: 1.install-package System.Text.Json 2. static void SystemTextJsonJsonSerializerDemo() { var obj = new { Id = 1, Name = "Fred", Age = 34 }; string jsonV 阅读全文
posted @ 2021-03-03 09:14 FredGrit 阅读(69) 评论(0) 推荐(0)
摘要: The new feature is only available in C# 8 or greater,so add below statement in csproj file <LangVersion>8</LangVersion> <PropertyGroup> <Configuration 阅读全文
posted @ 2021-03-02 15:23 FredGrit 阅读(91) 评论(0) 推荐(0)
摘要: using System; using System.Collections.Generic; using System.IO; using System.Security.Cryptography; using System.Security.Principal; using System.Tex 阅读全文
posted @ 2021-02-08 10:41 FredGrit 阅读(75) 评论(0) 推荐(0)
摘要: static void M2ClassDemo() { M2Class m2 = new M2Class(10); m2.PrintTime(); } public class M2Class { static int M2Value=0; static readonly M2Class m2Obj 阅读全文
posted @ 2021-01-28 11:24 FredGrit 阅读(60) 评论(0) 推荐(0)
摘要: static void TestDictionaryInSensitive() { try { var comparer = StringComparer.OrdinalIgnoreCase; Dictionary<string, string> dic = new Dictionary<strin 阅读全文
posted @ 2021-01-27 11:06 FredGrit 阅读(102) 评论(0) 推荐(0)
摘要: alter table AdventureWorks2019.sales.SalesOrderDetail add IsValid bit not null constraint IsValid_Default_Constraint Default 1 with values; This will 阅读全文
posted @ 2020-12-03 22:18 FredGrit 阅读(291) 评论(0) 推荐(0)
上一页 1 ··· 90 91 92 93 94 95 96 97 98 ··· 120 下一页