Re: [OT] My First C# (warning - long post)
- From: "Frank Swarbrick" <Frank.Swarbrick@xxxxxxxxxxxxxx>
- Date: Thu, 1 Feb 2007 15:31:33 -0700
LX-i<lxi0007@xxxxxxxxxxxx> 02/01/07 7:51 AM >>>
Along those lines - is there a better way to search through an array
other than "for (int i = 0; i < array.length; i++)"?
I'm not sure specifically what you are referring to, but, if we assume the
above code is something like
string array[] = new string[10];
for (int i = 0; i < array.length; i++)
{
doSomething(array[i]);
}
You can replace it with
foreach (string s in array)
{
doSomething(s);
}
Is that what you're looking for?
http://www.c-sharpcorner.com/UploadFile/mahesh/WorkingWithArrays111420050603
54AM/WorkingWithArrays.aspx
MF Net Express 5.0 has something similar for COBOL, which I'll post from
home.
Frank
---
Frank Swarbrick
Senior Developer/Analyst - Mainframe Applications
FirstBank Data Corporation - Lakewood, CO USA
.
- Follow-Ups:
- Re: [OT] My First C# (warning - long post)
- From: LX-i
- Re: My First C# (warning - long post)
- From: andrewmcdonagh
- Re: [OT] My First C# (warning - long post)
- References:
- Re: [OT] My First C# (warning - long post)
- From: LX-i
- Re: [OT] My First C# (warning - long post)
- From: Pete Dashwood
- Re: [OT] My First C# (warning - long post)
- From: LX-i
- Re: [OT] My First C# (warning - long post)
- Prev by Date: Re: Using IBM MF SCLM?
- Next by Date: Re: My First C# (warning - long post)
- Previous by thread: Re: [OT] My First C# (warning - long post)
- Next by thread: Re: My First C# (warning - long post)
- Index(es):
Relevant Pages
|