.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Imran Ghani

Home >> Articles >> LINQ >> Post New Resource Bookmark and Share   

 Subscribe to Articles

Without using while,for loop to print 1..10.

Posted By:laptop charles       Posted Date: October 07, 2010    Points: 15    Category: LINQ    URL: http://www.dotnetspark.com  

It is used if and goto statement,it act as a while loop to print 1 to 10 numbers

using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace withoutwhileloop
    class Program
        static void Main(string[] args)
            int n = 1;

            if (n <= 10)
                goto charles;
 Subscribe to Articles


Further Readings:


No response found. Be the first to respond this post

Post Comment

You must Sign In To post reply
Find More Articles on C#, ASP.Net, Vb.Net, SQL Server and more Here

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend