随笔分类 -  C#

C#
摘要:1.add reference,C:\Program Files\dotnet\packs\Microsoft.WindowsDesktop.App.Ref\8.0.11\ref\net8.0\PresentationCore.dll 2.Source code using System; usin 阅读全文
posted @ 2025-02-04 20:03 FredGrit 阅读(24) 评论(0) 推荐(0) 编辑
摘要:using System.Diagnostics; namespace ConsoleApp15 { internal class Program { static CancellationTokenSource cts { get; set; } static int idx = 0; stati 阅读全文
posted @ 2025-01-11 23:51 FredGrit 阅读(8) 评论(0) 推荐(0) 编辑
摘要://sp use mydb; CREATE PROCEDURE InsertIntoMtSpInStarEnd @StartId int =1, @EndId int =2021474638 AS BEGIN WHILE @StartId <= @EndId BEGIN DECLARE @Autho 阅读全文
posted @ 2025-01-04 20:23 FredGrit 阅读(2) 评论(0) 推荐(0) 编辑
摘要:Install-Package Newtonsoft.json static void ConvertXmlToJson(string xmlFile,string jsonFile) { try { if(File.Exists(xmlFile)) { using(FileStream fs=ne 阅读全文
posted @ 2024-12-14 00:02 FredGrit 阅读(9) 评论(0) 推荐(0) 编辑
摘要:using System.Diagnostics; using System.Xml; using System.Xml.Serialization; namespace ConsoleApp9 { internal class Program { static string xmlFile = " 阅读全文
posted @ 2024-12-13 23:35 FredGrit 阅读(17) 评论(0) 推荐(0) 编辑
摘要:using System.Runtime.InteropServices; namespace ConsoleApp6 { internal class Program { //copy from,https://gist.github.com/6rube/34b561827f0805f737425 阅读全文
posted @ 2024-12-12 22:41 FredGrit 阅读(23) 评论(0) 推荐(0) 编辑
摘要:1.Install SVG the third party software tool from nuget; 2. using System; using System.Collections.Generic; using System.Drawing.Imaging; using System. 阅读全文
posted @ 2024-11-22 00:07 FredGrit 阅读(3) 评论(0) 推荐(0) 编辑
摘要:using System.Security.Cryptography; using System.Text.Unicode; namespace ConsoleApp4 { internal class Program { static void Main(string[] args) { stri 阅读全文
posted @ 2024-11-16 19:07 FredGrit 阅读(5) 评论(0) 推荐(0) 编辑
摘要:namespace ConsoleApp4 { internal class Program { static void Main(string[] args) { string bigFile = @"C:\Users\fred\Downloads\ebook-master.zip"; ReadB 阅读全文
posted @ 2024-11-16 18:56 FredGrit 阅读(38) 评论(0) 推荐(0) 编辑
摘要:System.OutOfMemoryException HResult=0x8007000E Message=Exception of type 'System.OutOfMemoryException' was thrown. Source=mscorlib StackTrace: at Syst 阅读全文
posted @ 2024-10-31 23:22 FredGrit 阅读(14) 评论(0) 推荐(0) 编辑
摘要:using System.Collections.Concurrent; using System.Diagnostics; namespace ConsoleApp85 { internal class Program { static void Main(string[] args) { try 阅读全文
posted @ 2024-09-26 22:17 FredGrit 阅读(4) 评论(0) 推荐(0) 编辑
摘要:1. dotnet add package Pomelo.EntityFrameworkCore.MySql using Microsoft.EntityFrameworkCore; namespace ConsoleApp84 { internal class Program { static v 阅读全文
posted @ 2024-09-24 21:57 FredGrit 阅读(40) 评论(0) 推荐(0) 编辑
摘要:Managed Debugging Assistant 'ContextSwitchDeadlock' : 'The CLR has been unable to transition from COM context 0x28ab560 to COM context 0x28ab4a8 for 6 阅读全文
posted @ 2024-09-14 15:36 FredGrit 阅读(7) 评论(0) 推荐(0) 编辑
摘要:public DelCmd ExportAllCmd { get; set; } public DelCmd ExportAllBinaryFormatterCmd { get; set; } public DelCmd DeserializeJsonFileCmd { get; set; } pu 阅读全文
posted @ 2024-09-14 12:48 FredGrit 阅读(7) 评论(0) 推荐(0) 编辑
摘要:using System.Diagnostics; // See https://aka.ms/new-console-template for more information Console.WriteLine("Hello, World!"); string path= @"..\..\..\ 阅读全文
posted @ 2024-09-09 22:13 FredGrit 阅读(179) 评论(0) 推荐(0) 编辑
摘要:Blob stands for binary large object byte[] bytesArr= (byte[])rows[i]["congest"]; bk.Congest = Encoding.UTF8.GetString(bytesArr) public static DataSet 阅读全文
posted @ 2024-09-01 23:24 FredGrit 阅读(8) 评论(0) 推荐(0) 编辑
摘要:namespace ConsoleApp59 { internal class Program { static string path = System.IO.Path.GetDirectoryName(System.Reflection.Assembly.GetExecutingAssembly 阅读全文
posted @ 2024-09-01 13:55 FredGrit 阅读(4) 评论(0) 推荐(0) 编辑
摘要:Copy from https://www.erikzhou.com/blogs/reflection_in_csharp/ Pros and Cons of Reflection Reflection is a powerful tool, but it comes with its own se 阅读全文
posted @ 2024-08-27 18:51 FredGrit 阅读(8) 评论(0) 推荐(0) 编辑
摘要:using System.Diagnostics; using System.IO; using System.Reflection; using System.Text; namespace ConsoleApp58 { internal class Program { static List<B 阅读全文
posted @ 2024-08-27 18:38 FredGrit 阅读(3) 评论(0) 推荐(0) 编辑
摘要:using System.Threading; namespace ConsoleApp57 { internal class Program { static void Main(string[] args) { PrintNumers(); Console.WriteLine("Hello, W 阅读全文
posted @ 2024-08-27 17:54 FredGrit 阅读(3) 评论(0) 推荐(0) 编辑

点击右上角即可分享
微信分享提示