随笔分类 - C#
C#
摘要:using System.Threading; namespace ConsoleApp57 { internal class Program { static void Main(string[] args) { PrintNumers(); Console.WriteLine("Hello, W
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Windows; using System
阅读全文
摘要:1.Add Com Reference,Microsoft.Office.Interop.Excel 2. using Microsoft.Office.Interop.Excel; using System; using System.IO; using System.Runtime.Compil
阅读全文
摘要:using System; using System.Collections.Generic; using System.IO; using System.Linq; using System.Runtime.Serialization.Formatters.Binary; using System
阅读全文
摘要:using System; using System.Collections.Generic; using System.Drawing; using System.Linq; using System.Text; using System.Threading.Tasks; using System
阅读全文
摘要:using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq; using System.Text; using System.Threading; using Syste
阅读全文
摘要:if(System.IO.File.Exists(imgPath)) { System.Diagnostics.Process.Start(imgPath); } //xaml <Window x:Class="WpfApp261.MainWindow" xmlns="http://schemas.
阅读全文
摘要:Install-Package ExcelDataReader using ExcelDataReader; using System.Text; using System.IO; namespace ConsoleApp50 { internal class Program { static vo
阅读全文
摘要:Install-Package Aspose.Imaging using (Aspose.Imaging.Image aspImg = Aspose.Imaging.Image.Load(rawImgUrl)) { Aspose.Imaging.RasterImage rasterImg = asp
阅读全文
摘要:private void SerializeDemo() { var obj = new[] { new { CountryId=1, CountryName="USA", StateList= new [] { new[] { new { StateId=1, StateName="NY", Ci
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.IO; using System.Net;
阅读全文
摘要://usercontrol <UserControl x:Class="WpfApp157.ImageListBox" xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation" xmlns:x="http://schemas.
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Management; using System.Text; using System.Threading.Tasks; using Sys
阅读全文
摘要:1.Install System.Management in Nuget; 2 using System.Management; namespace ConsoleApp37 { internal class Program { static void Main(string[] args) { S
阅读全文
摘要:private void Image_MouseLeftButtonDown(object sender, MouseButtonEventArgs e) { string imgJson1 = JsonConvert.SerializeObject(img1); System.IO.File.Ap
阅读全文
摘要:using listOfInt = System.Collections.Generic.List<int>; namespace ConsoleApp36 { internal class Program { static void Main(string[] args) { GenericTyp
阅读全文
摘要://Index was outside the bounds of the array.//Source array was not long enough. Check srcIndex and length, and the array's lower bounds //using System
阅读全文
摘要:var dataItems = dg.ItemsSource?.Cast<Book>()?.ToList(); List<List<Book>> booksListList = new List<List<Book>>(); for (int i = 0; i < dataItems.Count;
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApp35 { internal
阅读全文
摘要:using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; using System.Configuration; using
阅读全文