摘要: 求解数字二进制表示中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(); } } 这个程序的递归实现 阅读全文
posted @ 2012-11-05 20:51 super 86 阅读(449) 评论(0) 推荐(0) 编辑
摘要: 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 阅读全文
posted @ 2012-11-05 19:42 super 86 阅读(417) 评论(0) 推荐(0) 编辑