<div dir="ltr"><div dir="ltr"><br></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">Il giorno lun 24 ago 2020 alle ore 14:34 Fabien Bodard <<a href="mailto:gambas.fr@gmail.com">gambas.fr@gmail.com</a>> ha scritto:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Arf..<br>
<br>
make a class<br>
<br>
'Class CEpisode<br>
Static Public SortMode As Integer<br>
Public Enum bySeriesName, byEpisodeName, byEpisodeNumber '... etc<br>
<br>
Public SeriesName As String<br>
Public EpisodeName As String<br>
Public EpisodeNumber As Integer<br>
Public EpisodeDescription As String<br>
Public EpisodeDatePublished As String<br>
Public EpisodeIdentifier As String<br>
Public SeriesDescription As String<br>
<br>
Public Sub _Compare(Other As CEpisode) As Integer<br>
<br>
Select Case SortMode<br>
Case bySerieName<br>
Return Comp(Me.SeriesName, Other.SeriesName)<br>
Case ByEpisodeName<br>
Return Comp(Me.EpisodeName, Other.EpisodeName)<br>
Case ByEpisodNumber<br>
If Me.EpisodeNumber < Other.EpisodeNumber Then Return -1<br>
If Me.EpisodeNumber < Other.EpisodeNumber Then Return 1<br>
Return<br>
<br>
<br>
'etc...<br>
<br>
End Select<br>
<br>
End<br></blockquote><div><br></div><div>Hi Fabien,<br><br>it's true I should have used enumerators, but other than that my class is nicer :-P<br><br>;-D<br><br>Ciao e viva il Cognac!<br>Gianluigi <br></div></div></div>