Wrox Programmer Forums
|
Pro Visual Basic 2005 For advanced Visual Basic coders working in version 2005. Beginning-level questions will be redirected to other forums, including Beginning VB 2005.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Pro Visual Basic 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 9th, 2008, 02:59 AM
Authorized User
 
Join Date: Aug 2007
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default come out from loop

i know that break clause is working fine if i want to come out from loop,but if i want to come out from loop what can i use?thanks in advance.

 
Old July 9th, 2008, 04:18 AM
Authorized User
 
Join Date: Aug 2007
Posts: 10
Thanks: 0
Thanked 0 Times in 0 Posts
Default

let me give you reply my self so if any one new comer comes he can understand after searching on net i used it and it works perfectly here example for it ,u can use exit for to come out from for loop and exit while to come put from while loop.

eg.
 For j = 66 To 90
            i = i + 1
            c = Convert.ToChar(j)
            If i = 25 Then
                Exit For
            End If
            ch(ar) = c.ToString()
            ar = ar + 1

        Next j









Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with for-each loop athanatos XSLT 0 April 10th, 2006 07:20 PM
Do Until loop with IF crmpicco Classic ASP Databases 2 June 15th, 2005 05:35 PM
For....Loop kliu9 Excel VBA 5 February 10th, 2005 06:43 AM
Do Loop junemo Beginning PHP 8 July 28th, 2004 02:58 AM
nested while loop doesn't loop hosefo81 PHP Databases 5 November 12th, 2003 08:46 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.