C# :: Aufgabe #7 :: Lösung #11
15 Lösungen
#7
Übung mehrdimensionales Datenfeld welches aus zufälligen Inhalten besteht darstellen
Anfänger - C#
von Gustl
- 30.07.2012 um 23:37 Uhr
#11
von kjaenke (1140 Punkte)
- 03.08.2017 um 13:07 Uhr
public static List<uint[]> BuildField(uint[,,] Field)
{
List<uint[]> Result = new List<uint[]>();
for (uint a = uint.MaxValue, i = 0; i < Field.GetLength(0); i++)
for (uint x = 0; x < Field.GetLength(1); x++)
for (uint y = 0; y < Field.GetLength(2); y++)
{
if (Field[i, x, y] > a) continue;
else if (Field[i, x, y] < a)
{
a = Field[i, x, y];
Result.Clear();
}
Result.Add(new uint[] { i, x, y });
}
return Result;
}
Kommentare:
Für diese Lösung gibt es noch keinen Kommentar
Seite 1 von 0
1
