Click here to Skip to main content
15,912,204 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionCreating an arraylist of an object Pin
Geoff_300124-Jan-07 22:34
Geoff_300124-Jan-07 22:34 
AnswerRe: Creating an arraylist of an object Pin
Guffa24-Jan-07 23:11
Guffa24-Jan-07 23:11 
GeneralRe: Creating an arraylist of an object Pin
Geoff_300124-Jan-07 23:34
Geoff_300124-Jan-07 23:34 
AnswerRe: Creating an arraylist of an object Pin
nlarson1125-Jan-07 2:28
nlarson1125-Jan-07 2:28 
GeneralRe: Creating an arraylist of an object Pin
Geoff_300125-Jan-07 2:54
Geoff_300125-Jan-07 2:54 
GeneralRe: Creating an arraylist of an object Pin
Geoff_300126-Jan-07 0:53
Geoff_300126-Jan-07 0:53 
AnswerRe: Creating an arraylist of an object Pin
Geoff_300125-Jan-07 4:15
Geoff_300125-Jan-07 4:15 
AnswerRe: Creating an arraylist of an object Pin
Geoff_300126-Jan-07 1:58
Geoff_300126-Jan-07 1:58 
Hey I solved my own question.

The problem with my code was I was returning 1 for greater than an zero for <= .
The compare function should return 1 for greater than 0 for equal to and -1 for less than. Phew on to the next stage.


Public Class Posts<br />
        Implements IComparable<br />
        Public Name As String<br />
        Public ID As Integer<br />
        Public Selected As Boolean<br />
<br />
        Public Function CompareTo(ByVal obj As Object) As Integer Implements System.IComparable.CompareTo<br />
            Dim temp As Posts = CType(obj, Posts)<br />
            Dim mestxt<br />
<br />
            If Name > temp.Name Then<br />
                Return 1<br />
            ElseIf Name = temp.Name Then<br />
                Return 0<br />
            Else<br />
                Return -1<br />
            End If<br />
<br />
        End Function<br />
<br />
    End Class

QuestionBind List of files and folders in a Directory Pin
umaheshchandra24-Jan-07 22:02
umaheshchandra24-Jan-07 22:02 
Questionbarcode using vb6 PRINTER OBJECT Pin
tj2824-Jan-07 22:01
tj2824-Jan-07 22:01 
AnswerRe: barcode using vb6 PRINTER OBJECT Pin
CPallini25-Jan-07 1:40
mveCPallini25-Jan-07 1:40 
Questionauthenticating email Pin
the.bombardier24-Jan-07 21:24
the.bombardier24-Jan-07 21:24 
AnswerRe: authenticating email Pin
Dave Kreskowiak25-Jan-07 7:45
mveDave Kreskowiak25-Jan-07 7:45 
Questionwhat are the different types of client server architecture ? Pin
Member 342845124-Jan-07 21:01
Member 342845124-Jan-07 21:01 
AnswerRe: what are the different types of client server architecture ? Pin
Colin Angus Mackay24-Jan-07 21:36
Colin Angus Mackay24-Jan-07 21:36 
QuestionCan i debug a program from Program Debug Database (PDB) file? Pin
merlynml24-Jan-07 20:49
merlynml24-Jan-07 20:49 
AnswerRe: Can i debug a program from Program Debug Database (PDB) file? Pin
Duncan Edwards Jones26-Jan-07 9:05
professionalDuncan Edwards Jones26-Jan-07 9:05 
QuestionSend and Recieve Messages Pin
Kumaran21cen24-Jan-07 18:36
Kumaran21cen24-Jan-07 18:36 
Questionhow can i change the cellwidth of all the columns in a table in a dataset Pin
anujose24-Jan-07 18:06
anujose24-Jan-07 18:06 
AnswerRe: how can i change the cellwidth of all the columns in a table in a dataset Pin
nlarson1125-Jan-07 2:20
nlarson1125-Jan-07 2:20 
QuestionHow to tell which form opened this form Pin
sdkgolf24-Jan-07 17:38
sdkgolf24-Jan-07 17:38 
AnswerRe: How to tell which form opened this form Pin
Colin Angus Mackay24-Jan-07 21:39
Colin Angus Mackay24-Jan-07 21:39 
GeneralRe: How to tell which form opened this form Pin
sdkgolf25-Jan-07 16:27
sdkgolf25-Jan-07 16:27 
GeneralRe: How to tell which form opened this form Pin
Colin Angus Mackay25-Jan-07 21:17
Colin Angus Mackay25-Jan-07 21:17 
Questiondisable/enabled tabpages in tabcontrol Pin
gladsmhe24-Jan-07 16:38
gladsmhe24-Jan-07 16:38 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.