zoukankan
html css js c++ java
datatable的手工构造过程
Code
//
声明一个名称为default的datatable
DataTable dt
=
new
DataTable(
"
default
"
);
//
声明int类型的列id
DataColumn dc
=
new
DataColumn(
"
id
"
,
typeof
(
int
));
//
为Datatable增加一列
dt.Columns.Add(dc);
//
声明int类型的列title
dc
=
new
DataColumn(
"
title
"
,
typeof
(
string
));
//
为Datatable增加一列
dt.Columns.Add(dc);
//
声明int类型的列content
dc
=
new
DataColumn(
"
content
"
,
typeof
(
string
));
//
为Datatable增加一列
dt.Columns.Add(dc);
dc.AutoIncrement
=
true
;
//
为Datatable增加一行
DataRow dr
=
dt.NewRow();
dr[
"
id
"
]
=
1
;
dr[
"
title
"
]
=
"
hao
"
;
dr[
"
content
"
]
=
"
content
"
;
dt.Rows.Add(dr);
//
为Datatable增加一行
dr
=
dt.NewRow();
dr[
"
id
"
]
=
1
;
dr[
"
title
"
]
=
"
hao
"
;
dr[
"
content
"
]
=
"
content
"
;
dt.Rows.Add(dr);
查看全文
相关阅读:
nodejs向远程服务器发送post请求----融云Web SDK/客户端获取token
Oauth2.0认证---授权码模式
AngularJS---自定义指令
Leetcode160-Intersection of Two Linked Lists-Easy
Lintcode489-Convert Array List to Linked List-Easy
Lintcode228-Middle of Linked List-Naive
Lintcode174-Remove Nth Node From End of List-Easy
Lintcode225-Find Node in Linked List-Naive
Lintcode85-Insert Node in a Binary Search Tree-Easy
Lintcode93-Balanced Binary Tree-Easy
原文地址:https://www.cnblogs.com/Mblog/p/1603183.html
最新文章
Citroen CN22 Key Cutting via Xhorse Dolphin XP-005
How to use Xhorse Mini OBD Tool to Program 2020 Kia Sportage Key?
Program Mazda CX-5 2020 Key with Xhorse VVDI Key Tool Plus
BMW 320 E46 Key Cutting with Xhorse Condor Mini Plus
Program Toyota H Key All Keys Lost by Xhorse VVDI Key Tool Plus
What is inside the Xhorse VVDI Prog Hardware?
Xhorse VVDI Key Tool Plus Adds a Key for Skoda Octavia 2017 MQB
Xhorse VVDI Key Tool Plus adds 2019 VW POLO MQB49 Key
Threadlocal使用注意问题
zk和eureka用作服务发现对比
热门文章
spring事务
springboot aop记录日志
我的第一次
Lua学习----面向对象编程
Lua学习---函数定义
Lua学习---Lua的控制结构
Lua学习----Lua的表达式
Lua学习----Lua基础数据类型
nodejs单元测试
nodejs+sequelize操作mysql数据库
Copyright © 2011-2022 走看看