Autor Beitrag
tomycat
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Beiträge: 265
Erhaltene Danke: 1



BeitragVerfasst: Mi 03.05.23 08:37 
ausblenden C#-Quelltext
1:
2:
3:
4:
int[] array1 = new int[] { 123 };
int[] array2 = new int[] { 456 };

int[] result = array1.Concat(array2).ToArray();

was mache ich bei...
ausblenden C#-Quelltext
1:
int[] array3 = new int[] { 789 };					


Moderiert von user profile iconTh69: falsche C#-Tags korrigiert (</cs>)
Moderiert von user profile iconTh69: Topic aus WinForms verschoben am Mi 03.05.2023 um 08:44
Th69
ontopic starontopic starontopic starontopic starontopic starontopic starontopic starontopic star
Moderator
Beiträge: 4764
Erhaltene Danke: 1052

Win10
C#, C++ (VS 2017/19/22)
BeitragVerfasst: Mi 03.05.23 08:49 
Einfach noch mal Concat() aufrufen:
ausblenden C#-Quelltext
1:
int[] result = array1.Concat(array2).Concat(array3).ToArray();					


Gefunden habe ich noch diese generische Methode (für beliebig viele Arrays): Concat many arrays with c#

Für diesen Beitrag haben gedankt: tomycat