随笔分类 - C#
摘要:public class PowersOf2{ static void Main() { // Display powers of 2 up to the exponent of 8: foreach (int i in Power(2, 8)) { Console.Write("{0} ", i); } } public static System.Collections.IEnumerable Power(int number, int exponent) { int ...
阅读全文
摘要:C# String IsNullOrEmpty
阅读全文
摘要:1 /// 2 /// 生成随机字符串 3 /// 4 private class RandomStringGenerator 5 { 6 static readonly Random r = new Random(); 7 const string _chars = "0123456789"; 8 public static string GetRandomString() 9 { 10 char[] buffer = new char[5]; 11 for (int i = 0; i ...
阅读全文
摘要:1 using System; 2 using System.Json; 3 using System.Net.Http; 4 5 namespace WorldBankSample 6 { 7 /// 8 /// Sample download list of countries from the World Bank Data sources at http://data.worldbank.org/ 9 /// 10 class Program11 {12 static string _address = "http://ap...
阅读全文
浙公网安备 33010602011771号