摘要:
using System.Net.Http; static void Main(string[] args) { var httpTask = Task<string>.Run<string>(() => { return MainAsync(); }); httpTask.Wait(); Cons 阅读全文
摘要:
static DataTable SplitJsonValueToDataTable(string postResult) { DataTable dt = new DataTable(); try { string[] dataArr = postResult.Split(new string[] 阅读全文
摘要:
using System.Security.Cryptography; static void Main(string[] args) { string rawString = "Make every second count."; string encryptedString = Encrypt3 阅读全文
摘要:
static void WebClientDownLoad() { string url = "http://p4.ssl.cdn.btime.com/t0167dce5a13c3da30d.jpg?size=5012x3094"; WebClient client = new WebClient( 阅读全文
摘要:
using System; using System.Collections.Generic; using System.Linq; using System.Threading; using System.Threading.Tasks; using System.Windows.Forms; n 阅读全文
摘要:
public enum Seasons { Spring,Summer,Autumn,Winter } static string GetEnumItemName(Enum enumItem) { string itemName = Enum.GetName(enumItem.GetType(), 阅读全文
摘要:
static void Main(string[] args) { SystemThreadingTimerDemo(); Console.ReadLine(); } static void SystemThreadingTimerDemo() { System.Threading.Timer ti 阅读全文
摘要:
static void CheckedUnCheckedDemo() { int i = int.MaxValue; try { //checked //{ // Console.WriteLine(i + 1); //} unchecked { Console.WriteLine(i + 1); 阅读全文
摘要:
A finally block does not always xecute. The code in the try block could go into an infinite loop, the exception could rigger a “fail fast” (which take 阅读全文
摘要:
using System; using System.Collections.Generic; using System.Diagnostics; using System.IO; using System.Threading; using Newtonsoft.Json; using System 阅读全文