日期:2014-05-17  浏览次数:20890 次

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;