Advertisement
touhid_xml

Looping Single Dimensional String array C#

Apr 3rd, 2013
342
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.36 KB | None | 0 0
  1. <%@Page Language="C#" %>
  2.  
  3. <script runat="server">
  4. String[] city = new String[7] {
  5. "Dhaka",
  6. "Rajshahi",
  7. "Rangpur",
  8. "Sylhet",
  9. "Khulna",
  10. "Barisal",
  11. "Chittagong"};
  12.    
  13.     void  loop(){
  14.         int i = 0;
  15.         while(i < city.Length){
  16.             Response.Write(city[i] + "<br />\n");
  17.             i++;
  18.         }
  19.     }
  20.    
  21. </script>
  22.  
  23. <% loop(); %>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement