473,490 Members | 2,703 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

C#NET2008 - How to declare Array

126 New Member
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(ArraySales()) Step 1

Next


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

Thank you.
Cheers,
Lennie
Oct 23 '10 #1
1 1629
GaryTexmo
1,501 Recognized Expert Top Contributor
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!
Oct 23 '10 #2

Sign in to post your reply or Sign up for a free account.

Similar topics

5
12557
by: Philipp | last post by:
Hello, I've got a class Lattice which is declared like that: // file: lattice.h class Lattice:public EventChooser{ public: Lattice(LatticeParameters* params); virtual ~Lattice(); //...
2
5320
by: Youn ki beom | last post by:
class A { A() {} }; class B { A* array; A* p_toA;
7
11545
by: b83503104 | last post by:
Previously, when my constructor had no arguments, I used this to declare my objects: MyClass myObject; Now, my constructor has arguments (MyClass::MyClass(int someVariable)), how do I declare...
4
35684
by: Laszlo Szijarto | last post by:
Thank you in advance, I am trying to populate a HashTable object with a value that's an array, but I don't want to put in two lines of code for each entry. rather than saying int value =...
2
3271
by: Petez | last post by:
Hi, I want to declare array of System::Data::DataRow but how? With single variable I write System::Data::DataRow^ aRow but statement System::Data::DataRow^ - not works. System::Data::DataRow* ...
6
7470
by: John A Grandy | last post by:
inside a procedure , i code Dim values(1) As Object .... various other lines of code ... ReDim values(2) As Object
8
19698
by: james | last post by:
Hi, Just looking here: http://msdn2.microsoft.com/en-us/library/9b9dty7d.aspx I can't quite see what I want to do. I want an array of Booleans of length 102, all initially "false". I have this...
3
11903
pentahari
by: pentahari | last post by:
My function is: Function test(optional ByVal arr1() as System.Array) End Function how to declare the array as optional? i know that optional variable must be constant value, but i don't...
4
8083
by: robert.waters | last post by:
I have to parse a binary file having a number of fixed records, each record containing datas in fixed positions. I would like to parse this binary file into an array of structures having members...
0
7112
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7146
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
5448
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
4573
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3084
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
3074
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1389
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
628
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
277
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.