Array String

  • Thread starter Thread starter Piero
  • Start date Start date
P

Piero

Hi,
i must create an string array to save a record of a txt file.... the
number of record is't the same...
someone can help me?
thanks
 
i must create an string array to save a record of a txt file.... the
number of record is't the same...
someone can help me?

It would help if you could give a bit more information. Is there any
reason why you need to use an array instead of a List<string> which
you can keep adding to? How are you going to populate the array? What
will you do with it afterwards?

Jon
 
It would help if you could give a bit more information. Is there any
reason why you need to use an array instead of a List<string> which
you can keep adding to? How are you going to populate the array? What
will you do with it afterwards?

Jon

i have a file txt: address book.txt. in this file any record is a
different person; in the record there are some information like
'name', 'phone','address' and any other...
i create a class that import a file and save a single information of
record in a different place of array.when all information of one
record is saved, i must write a new file with part of this
information. All of operation, are in a "FOR" loop or cycle( i don't
now which word is better )
can you understand?

thanks
 
Piero said:
i have a file txt: address book.txt. in this file any record is a
different person; in the record there are some information like
'name', 'phone','address' and any other...

Okay - and how are those stored?
i create a class that import a file and save a single information of
record in a different place of array.when all information of one
record is saved, i must write a new file with part of this
information. All of operation, are in a "FOR" loop or cycle( i don't
now which word is better )
can you understand?

Well, it sounds like a List<Person> will be fine.
 
Okay - and how are those stored?


Well, it sounds like a List<Person> will be fine.




the file are stored in c:\Test

then, you think that i must use a ListArray and not Array to
"increase" the performance?
thanks
 
Piero said:
the file are stored in c:\Test

That's *where* they're stored - I was asking about *how* the data is
stored, i.e. the format.
then, you think that i must use a ListArray and not Array to
"increase" the performance?

No, I think you should use a List<string> (or ArrayList, or something
similar) rather than an array so that you don't need to know how many
items to create before you start.
 
That's *where* they're stored - I was asking about *how* the data is
stored, i.e. the format.


No, I think you should use a List<string> (or ArrayList, or something
similar) rather than an array so that you don't need to know how many
items to create before you start.

ok, Jon thanks a lot!!
bye!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top