当前位置: 代码迷 >> ASP >> Asp.net遍历数组范例!(源代码示例,有傻瓜说明!)
  详细解决方案

Asp.net遍历数组范例!(源代码示例,有傻瓜说明!)

热度:114   发布时间:2012-11-22 00:16:41.0
Asp.net遍历数组实例!(源代码示例,有傻瓜说明!)
       String[] Sql_FieldValue = { "a", "b", "c", "d", "e", "f", "g" };//【数组】

        int m_count = Sql_Field.Length; // 数组个数
        String m_field="";

        for (int i = 0; i < m_count; i++)  // ---------- 字段循环
        {
            m_field = m_field + Sql_FieldValue[i];

            Response.Write("第" + i.ToString() + "个取值:" + Sql_Field[i]);


        }  // End_For

        Response.Write("最后取的值是" + m_field;

       String[] Sql_FieldValue = { "a", "b", "c", "d", "e", "f", "g" };//【数组】

        int m_count = Sql_Field.Length; // 数组个数
        String m_field="";

        for (int i = 0; i < m_count; i++)  // ---------- 字段循环
        {
            m_field = m_field + Sql_FieldValue[i];

            Response.Write("第" + i.ToString() + "个取值:" + Sql_Field[i]);


        }  // End_For
        Response.Write("最后取的值是" + m_field;


  相关解决方案