Halllo Leute,
wie kann ich die
Mein bisheriger Code:
Und in dem Sub Main möchte ich folgendes anwenden:
Wie soll ich das anwenden?
Vielen Dank,
wincrash
wie kann ich die
Array.Sort
-Methode auf ein Structure-Array anwenden?Mein bisheriger Code:
VB.NET-Quellcode
- Public Structure ColorProbabilityStrucure
- Implements IComparable(Of ColorProbabilityStrucure)
- Public Property Color As Drawing.Color
- Public Property Probability As Double
- Public Function CompareTo(ByVal other As ColorProbabilityStrucure) As Integer Implements System.IComparable(Of _
- ColorProbabilityStrucure).CompareTo
- Dim oY As ColorProbabilityStrucure = CType(other, ColorProbabilityStrucure)
- If Me.Probability > oY.Probability Then Return 1
- If Me.Probability < oY.Probability Then Return -1
- If Me.Probability = oY.Probability Then
- If Me.Color.ToArgb > oY.Color.ToArgb Then Return 1
- If Me.Color.ToArgb < oY.Color.ToArgb Then Return -1
- If Me.Color.ToArgb = oY.Color.ToArgb Then Return 0
- End If
- End Function
- End Structure
Vielen Dank,
wincrash
(\_/) Das ist Hase.
(O.o) Kopiere Hase in deine Signatur
(> <) und hilf ihm so auf seinem Weg zur Weltherrschaft.
(O.o) Kopiere Hase in deine Signatur
(> <) und hilf ihm so auf seinem Weg zur Weltherrschaft.