摘要:
求解数字二进制表示中1的个数?代码如下:class Program { private int Get(int number) { if (number == 0) return 0; if (number == 1) return 1; return number % 2 + Get(number / 2); } static void Main(string[] args) { int n=0; n = Console.Read(); n = (new Program()).Get(n); Console.Write(n); Console.ReadKey(); } } 这个程序的递归实现 阅读全文
摘要:
XML:.....LoadOnDemand="ExplorerTreeView_LoadOnDemand">后台代码:private void ExplorerTreeView_LoadOnDemand(object sender, Telerik.Windows.RadRoutedEventArgs e) { RadTreeViewItem item = e.OriginalSource as RadTreeViewItem; if (item.Item is VoyageVO) { var voyage = item.Item as VoyageVO; Obser 阅读全文