[an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive] (none) [an error occurred while processing this directive] [an error occurred while processing this directive] [an error occurred while processing this directive][an error occurred while processing this directive]
 
[an error occurred while processing this directive] [an error occurred while processing this directive]
Skåne Sjælland Linux User Group - http://www.sslug.dk Home   Subscribe   Mail Archive   Forum   Calendar   Search
MhonArc Date: [Date Prev] [Date Index] [Date Next]   Thread: [Date Prev] [Thread Index] [Date Next]   MhonArc
 

C# nybegynder spørgsmål omkring ændring af array størrelse



Da jeg er begyndt at kigge lidt på C# programmering under MONO faldt jeg over et problem jeg ikke rigtigt kan få styr på.

Hvis jeg skal bruge et array af strings skal jeg oprette det med et bestemt antal elementer.

Dvs. mit array skal defineres sådan her:

	string[] mit_array = new string[max_antal_elementer];

Hvad gør man hvis max_antal_elementer ikke kendes, dvs. hvis man dynamisk skal tilføje elementer?

Et typisk eksempel er, hvis man f.eks. skal læse data ind fra en ekstern database, hvor man på forhånd ikke kender til antallet af data elementer.

Mvh
Jesper K. Pedersen


 
Home   Subscribe   Mail Archive   Index   Calendar   Search

 
 
Questions about the web-pages to <www_admin>. Last modified 2006-05-01, 02:01 CEST [an error occurred while processing this directive]
This page is maintained by [an error occurred while processing this directive]MHonArc [an error occurred while processing this directive] # [an error occurred while processing this directive] *