C#NET2008 - How to declare Array

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • lenniekuah
    New Member
    • Oct 2006
    • 126

    #1

    C#NET2008 - How to declare Array

    Hullo Good Friends,
    I need your help, Please Help me.

    I am using C#Net2008 to develop Window Application.
    I have not create ARRAY before.

    The Project Manager asked me to use ARRAY to contain the following example data type from Call Center Table:

    10331 <-- Client Driving Licence
    16/10/2010 <-- Date Called
    17/10/2010 <-- Date Reponsed
    21/10/2010 <-- Date Closed

    His request is to reduced the coding based on individual data instead using FOR LOOP within using the same coding.

    In VB6 this is how I used but not in C#
    For i =1 to Ubound(ArraySal es()) Step 1

    Next


    Please share with me now to declare the single dimension ARRAY to accept numeric and string data.

    Thank you.
    Cheers,
    Lennie
  • GaryTexmo
    Recognized Expert Top Contributor
    • Jul 2009
    • 1501

    #2
    In this case it's a lot easier for me to direct you to MSDN than it is to explain how arrays work. It's a little different than in VB6. For starters, arrays are 0 indexed, not 1-indexed (ie, the first element starts at 0, not 1). For another, the syntax is quite different.

    Have a look here:
    http://msdn.microsoft.com/en-us/libr...8VS.71%29.aspx

    If you're just getting started with C# and .NET, MSDN contains a wealth of knowledge that will help you get going. And of course, Bytes contains a wealth of expertise to help you sort through any tangles you encounter both while learning, and while coding in general.

    Good luck!

    Comment

    Working...