导航

上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 35 下一页

2011年4月11日

摘要: using System;using System.Collections.Generic;using System.ComponentModel;using System.Data;using System.Drawing;using System.Text;using System.Windows.Forms;using DevComponents.DotNetBar;using DevComponents.DotNetBar.Controls;namespace CsharpTest{ public partial class Form1 : Form { public Form1() 阅读全文

posted @ 2011-04-11 16:02 beeone 阅读(909) 评论(0) 推荐(0) 编辑

摘要: break表示跳出循环,continue表示结束本次循环 示例程序如下: #include"stdio.h" voidmain() {intn,m; for(n=1;n<=10;n++)/*这个循环输出1234,在n是5的时候循环退出*/ {if(n==5) break; printf("%d",n); } printf("\n"); for(m=1;m<=10;m++)/*这个循环输出1234678910,*/ {if(m==5)/*在m是5的时候没有执行当次循环的其他语句,所以未输出5*/ continue; prin 阅读全文

posted @ 2011-04-11 15:38 beeone 阅读(231) 评论(0) 推荐(0) 编辑

2011年4月10日

摘要: 开始第一天。 阅读全文

posted @ 2011-04-10 17:33 beeone 阅读(195) 评论(0) 推荐(0) 编辑

摘要: TimeSpan ts = dtbig - dtsmall; if (ts.TotalDays <= 5) 阅读全文

posted @ 2011-04-10 17:32 beeone 阅读(241) 评论(0) 推荐(0) 编辑

2011年4月9日

摘要: 使用以下方法可以准确的记录代码运行的耗时。 System.Diagnostics.Stopwatch stopwatch = new Stopwatch(); stopwatch.Start(); // 开始监视代码运行时间 // you code .... stopwatch.Stop(); // 停止监视 TimeSpan timespan = stopwatch.Elapsed; // 获取当前实例测量得出的总时间 double hours = timespan.TotalHours; // 总小时 double minutes = timespan.Tota 阅读全文

posted @ 2011-04-09 21:39 beeone 阅读(1279) 评论(0) 推荐(1) 编辑

摘要: private void MakeDataTableAndDisplay(){ // Create new DataTable. DataTable myDataTable = new DataTable("MyDataTable"); // Declare DataColumn and DataRow variables. DataColumn myDataColumn; DataRow myDataRow; // Create new DataColumn, set DataType, ColumnName and add to DataTable. myDataCol 阅读全文

posted @ 2011-04-09 21:22 beeone 阅读(3535) 评论(0) 推荐(0) 编辑

摘要: 要过滤与排序DataTable对象中的DataRow,用DataTable的Select()方法,Select()方法调用:DataRow[] Select()DataRow[] Select(string filterExpression)DataRow[] Select(string filterExpression,string sortExpression)DataRow[] Select(string filterExpression,string SortExpression,DataViewRowState myDataViewRowState)其中:filterExpressi 阅读全文

posted @ 2011-04-09 21:21 beeone 阅读(3475) 评论(0) 推荐(0) 编辑

摘要: DataTable排序的一般方法一、重生法dstaset.Tables.Add(dt)dataset.Tables(0).DefaultView.Sort = "id desc"--------------------------------------------------------------------------------二、直接法dv = New DataView(dt)dv.Sort = "id desc"------------------------------------------------------------------ 阅读全文

posted @ 2011-04-09 21:20 beeone 阅读(932) 评论(0) 推荐(0) 编辑

摘要: using System;using System.Data;namespace DataTable_Create{/// <summary>/// 使用DataTable实现内存表/// </summary>class T{ /// <summary> /// 使用DataTable实现内存表 /// </summary> private void CreateDataTable() { // 声明一个DataTable DataTable myDataTable = new DataTable("ParentTable") 阅读全文

posted @ 2011-04-09 21:20 beeone 阅读(1550) 评论(0) 推荐(0) 编辑

摘要: .C#中DataTable技术学习 2009-09-10 14:37:18 阅读1496 评论0 字号:大中小 订阅 .1.在DataTable中执行DataTable.Select("条件")返回DataTable;// <summary>// 执行DataTable中的查询返回新的DataTable// </summary>// dt 是源数据DataTable// condition 是查询条件DataTable newdt = new DataTable();newdt = dt.Clone(); // 克隆dt 的结构,包括所有 dt 架构 阅读全文

posted @ 2011-04-09 21:19 beeone 阅读(7562) 评论(0) 推荐(1) 编辑

上一页 1 ··· 16 17 18 19 20 21 22 23 24 ··· 35 下一页