当前位置:首页
开发技术指南» 文章正文
    引言:

 ·如何设定a记录和mx记录    »显示摘要«
    摘要: 请问如何设定a记录和mx记录使得别人可以通过域名访问自己的网站和收取邮件? ......
    摘要: <script language=javascript> document.write("<form method="post" action="http://free.activeclub.net/script/login/verify.asp" target="_blank">");......


动态数组问题

using   System;  
   
  public   struct   tableStruct  
  {  
  public   string tableName; public   string[] colDef;  
  }  
   
  因为colDef的长度不确定,需要动态指定.如何实现?

NO.1   作者: exboy

public   string[]   colDef;  
   
  int   i   =   10;  
   
  colDef   =   new   string[i];  
   
  上面不知道行不行。试一下。  
   
  不过一般都用   ArrayList

NO.2   作者: uscool

可以使用动态指定!  
  如:  
  abc;//是你的数组  
  colDef=new   String[abc.Length];//动态创建  
   
  或者  
  int   i=10;//确定大小的数组  
  colDef=new   String[i];//动态创建  
   
   
  ArrayList也有利弊,操作是方便了,但是数据需要转换,呵呵!我感觉比较麻烦!

NO.3   作者: gcs925

string[]   sa;  
   
  int   c   =   100;  
  sa   =   new   string[c];  
   
  可以这样使用,我昨天刚刚试过,很方便的。

NO.4   作者: uscool

可以这么使用,原理还是一样的!  
  动态指定!  
  abc;//是你的数组  
  tableStruct   tab=new   tableStruct();  
  tab.colDef=new   String[abc.Length];//动态创建  
   
  或者  
  int   i=10;//确定大小的数组  
  tableStruct   tab=new   tableStruct();  
  tab.colDef=new   String[i];//动态创建  
   
  看到了吗?


    摘要: 我的电脑ie,有时候打开网页什么也不显示,这是怎么了? 比如说打开mail.163.com,显示的是完毕,但是整个也面就是一个空白!什么也没有,这是怎么了啊,请教各位了! ......
» 本期热门文章:

©2000-2007 All Rights Reserved. 最佳浏览:1024X768 MSIE