Solved

for loop in c#

Posted on 2004-10-27
228 Views
Last Modified: 2010-04-15
how would this loop look in c#


----------------------------

For i = 0 To n
            d(i, 0) = i
Next i

----------------------------

thanks
0
Question by:MrKevorkian
    3 Comments
     
    LVL 7

    Accepted Solution

    by:
    i believe it would look something like this....


    for(int i = 0; i < n; ++i)
    {
          d(i, 0) = i
    }


    just something to be careful of is the "++i" vs. "i++"

    0
     
    LVL 1

    Author Comment

    by:MrKevorkian
    thanks what does the ++ mean?

    0
     
    LVL 7

    Expert Comment

    by:brdrok
    the ++ is to increment a variable by 1.

    ++i is the same as i = i + 1
    0

    Write Comment

    Please enter a first name

    Please enter a last name

    We will never share this with anyone.

    Featured Post

    How to run any project with ease

    Manage projects of all sizes how you want. Great for personal to-do lists, project milestones, team priorities and launch plans.
    - Combine task lists, docs, spreadsheets, and chat in one
    - View and edit from mobile/offline
    - Cut down on emails

    Suggested Solutions

    Bit flags and bit flag manipulation is perhaps one of the most underrated strategies in programming, likely because most programmers developing in high-level languages rely too much on the high-level features, and forget about the low-level ones. Th…
    In order to hide the "ugly" records selectors (triangles) in the rowheaders, here are some suggestions. Microsoft doesn't have a direct method/property to do it. You can only hide the rowheader column. First solution, the easy way The first sol…
    This video Micro Tutorial is the first in a two-part series that shows how to create and use custom scanning profiles in Nuance's PaperPort 14.5 (http://www.experts-exchange.com/articles/17490/). But the ability to create custom scanning profiles al…
    This video Micro Tutorial is the second in a two-part series that shows how to create and use custom scanning profiles in Nuance's PaperPort 14.5 (http://www.experts-exchange.com/articles/17490/). But the ability to create custom scanning profiles a…

    933 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    19 Experts available now in Live!

    Get 1:1 Help Now