[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
 

Re: [PROGRAMMERING] C# nybegynder spørgsmål omkring ændring af array størrelse



Quoting Jacob Atzen <sslug@sslug>:

On Sun, Apr 30, 2006 at 10:58:07AM +0200, Kim Schulz wrote:
jeg ville bruge et ArrayList af Strings i stedet for et almindeligt
array.

ArrayList er vist Java, i C# hedder klassen bare List. Bemærk, at med C# 2.0 er generics introduceret, så man kan få bedre typecheck af, hvad man hælder ind og ud af sine collections. Jeg mener også at have læst, at Mono understøtter generics.

I .NET BCL findes ArrayList i namespacet System.Collections. Den tillader dynamisk tilføjelse af elementer. I System.Collections.Specialized findes StringCollection som kan bruges hvis man specifikt opererer med strenge.

Hvis man har 2.0 funktionalitet til rådighed er det oplagt at bruge den generiske List.

/thomash



 
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] *