Autor Beitrag
thD
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 33

Win 7, VirtualBox
C# (VS 2008)
BeitragVerfasst: Do 12.11.09 02:19 
Hi Leute, ich melde mich schon wieder mit einer Frage

und diese lautet:
Ist es möglich in einer List<> bestimmte, zuvor gespeicherte, Elemente zu sperren so das diese beim löschen erhalten bleiben?
Ist es in einem Array oder einer ArrayList möglich?


mfG thD
jaenicke
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 19315
Erhaltene Danke: 1747

W11 x64 (Chrome, Edge)
Delphi 11 Pro, Oxygene, C# (VS 2022), JS/HTML, Java (NB), PHP, Lazarus
BeitragVerfasst: Do 12.11.09 11:23 
Wie meinst du das? Wodurch werden diese gelöscht und was soll dabei das Sperren bewirken?

Alles was in einer List<> passiert, löst du doch selbst per Quelltext aus, warum muss da etwas gesperrt werden oder so? :gruebel:
thD Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 33

Win 7, VirtualBox
C# (VS 2008)
BeitragVerfasst: Do 12.11.09 17:13 
neine ich dachte, ich markiere bestimmte Elemente in der List<> und gebe dann den befehl .clear
meine markierten Elemente bleiben trotzdem in der List<>

hoffe ich habe mich verständlich ausgedrückt
Kha
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starhalf ontopic star
Beiträge: 3803
Erhaltene Danke: 176

Arch Linux
Python, C, C++ (vim)
BeitragVerfasst: Fr 13.11.09 00:32 
Wäre es da nicht einfacher, diese Elemente gleich in einer neuen Liste zu speichern und die alte fortzuwerfen?

_________________
>λ=
thD Threadstarter
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starofftopic star
Beiträge: 33

Win 7, VirtualBox
C# (VS 2008)
BeitragVerfasst: Fr 13.11.09 01:43 
So hab ich es bis jetzt gemacht.

Wollte nur wissen ob das möglich ist.

Ich schließe das Thema.
Danke für die Antworten.