zoukankan      html  css  js  c++  java
  • 属性索引访问代码实例

     1 using System.Data
     2 print( " OK le  " )
     3
     4 loadLib( " C:\WINDOWS\Microsoft.NET\Framework\v1.1.4322\System.Data.dll " )
     5 a = new  DataTable()
     6 c1  = new  DataColumn( " c1 " )
     7 a.Columns.Add(c1)
     8
     9 c2  = new  DataColumn( " c2 " )
    10 a.Columns.Add(c2)
    11
    12 c3  = new  DataColumn( " c3 " )
    13 a.Columns.Add(c3)
    14 print(a.GetType())
    15 b = a.NewRow()
    16 b[ 0 ] = " ni hao  "
    17 b[ 1 ] = " you hao  "
    18 b[ 2 ] = " hello world "
    19 print( "  o kle  " )
    20 c = a.Rows
    21 print(b)
    22 print(b[ 0 ])
    23 print(b[ 1 ])
    24 print(b[ 2 ])
    25  
    26 c.Add(b)
    27 print(c.Count)
    28 function  PrintTable(table)
    29 {
    30  
    31 print( " 表一共有 " + a.Rows.Count + " " )
    32      for (i = 0 ;i < a.Rows.Count;i = i + 1 )
    33     {
    34     print(a.Rows[i])
    35          for (j = 0 ;j < a.Columns.Count;j = j + 1 )
    36          {
    37      
    38         print( " " + i + " , " + j)
    39  
    40                 print(a.Rows[i][j])
    41         }

    42
    43    }

    44
    45  
    46 }

    47 PrintTable(a)
  • 相关阅读:
    Hbase 0.98集群搭建的详细步骤
    java使用Apache POI操作excel文件
    linux下用非root用户重启导致ssh无法连接的问题
    solr update
    solr(一)
    libreoffice
    git
    hbase基本操作
    http://webapp.docx4java.org/OnlineDemo/PartsList.html
    git
  • 原文地址:https://www.cnblogs.com/FlyFire/p/355949.html
Copyright © 2011-2022 走看看