class Program
{static void Main(string[] args){//转载请保留 http://www.luofenming.com/show.aspx?id=ART2020012600001{Stopwatch stopwatch = new Stopwatch();stopwatch.Start();for(int i = 0; i < 100000000; i++){ShowInt(1);//原生方法}stopwatch.Stop();Console.W…
2021-09-21 更新public static ListT ToListT(DataTable dt){try{//转载请保留 http://www.luofenming.com/show.aspx?id=ART2019120700001ListT list = new ListT();Type t = typeof(T);ListPropertyInfo plist = new ListPropertyInfo(typeof(T).GetPropertie…
方法一(推荐使用)public string HttpGet(string url){ using (HttpClient client = new HttpClient()) { var response = client.GetAsync(url).Result; if (response.IsSuccessStatusCode) { var content = response.Content.Re…