loop in structure while using c#.... how can we declare

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mohit goel
    New Member
    • Mar 2013
    • 1

    loop in structure while using c#.... how can we declare

    if we r making a library record for five book then we have to use for loop like title, author, subject, pages..etc

    how will i call them in C#,
    in c++ we st[5]; and we write st[i].title...etc

    how we can make similar thing in c#
  • r035198x
    MVP
    • Sep 2006
    • 13225

    #2
    They are called arrays. You can read about them from the C# programming guide: http://msdn.microsoft.com/en-us/library/9b9dty7d.aspx

    You loop through them using a while or a for statement: http://msdn.microsoft.com/en-us/library/ch45axte.aspx

    You should read the whole C# programming guide before writing code in C#.

    Comment

    Working...