Click here to Skip to main content
15,914,500 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: how to take images path into an array Pin
KIDYA7-Jul-09 2:34
KIDYA7-Jul-09 2:34 
GeneralRe: how to take images path into an array Pin
helelark1237-Jul-09 10:05
helelark1237-Jul-09 10:05 
GeneralRe: how to take images path into an array Pin
KIDYA7-Jul-09 22:54
KIDYA7-Jul-09 22:54 
QuestionDEVELOPING A HOTEL RESERVATION SYSTEM Pin
kimbowa sande5-Jul-09 20:38
kimbowa sande5-Jul-09 20:38 
AnswerRe: DEVELOPING A HOTEL RESERVATION SYSTEM Pin
Mycroft Holmes5-Jul-09 21:19
professionalMycroft Holmes5-Jul-09 21:19 
AnswerRe: DEVELOPING A HOTEL RESERVATION SYSTEM Pin
Tom Deketelaere5-Jul-09 22:27
professionalTom Deketelaere5-Jul-09 22:27 
GeneralRe: DEVELOPING A HOTEL RESERVATION SYSTEM Pin
Colin Angus Mackay6-Jul-09 2:02
Colin Angus Mackay6-Jul-09 2:02 
GeneralRe: DEVELOPING A HOTEL RESERVATION SYSTEM Pin
Eddy Vluggen6-Jul-09 3:13
professionalEddy Vluggen6-Jul-09 3:13 
AnswerRe: DEVELOPING A HOTEL RESERVATION SYSTEM Pin
Colin Angus Mackay6-Jul-09 2:05
Colin Angus Mackay6-Jul-09 2:05 
GeneralRe: DEVELOPING A HOTEL RESERVATION SYSTEM Pin
kimbowa sande30-Jul-09 4:39
kimbowa sande30-Jul-09 4:39 
GeneralRe: DEVELOPING A HOTEL RESERVATION SYSTEM Pin
Colin Angus Mackay30-Jul-09 10:02
Colin Angus Mackay30-Jul-09 10:02 
Questionhow to add sql statement in databinding?, vb 2005 Pin
wongth75-Jul-09 20:23
wongth75-Jul-09 20:23 
Questionproblem with delete button ..vb 2005 Pin
wongth75-Jul-09 20:17
wongth75-Jul-09 20:17 
QuestionPrint Out Problem in Billing system??? Pin
JC.KaNNaN5-Jul-09 19:32
JC.KaNNaN5-Jul-09 19:32 
AnswerRe: Print Out Problem in Billing system??? Pin
EliottA6-Jul-09 2:53
EliottA6-Jul-09 2:53 
QuestionWrite to a word doc which is already open. Pin
Musa Biralo5-Jul-09 16:47
Musa Biralo5-Jul-09 16:47 
AnswerRe: Write to a word doc which is already open. Pin
Christian Graus5-Jul-09 17:03
protectorChristian Graus5-Jul-09 17:03 
QuestionSorting a structure array Pin
Jacob Dixon5-Jul-09 11:53
Jacob Dixon5-Jul-09 11:53 
AnswerRe: Sorting a structure array Pin
Luc Pattyn5-Jul-09 12:40
sitebuilderLuc Pattyn5-Jul-09 12:40 
GeneralRe: Sorting a structure array Pin
Jacob Dixon5-Jul-09 12:44
Jacob Dixon5-Jul-09 12:44 
AnswerRe: Sorting a structure array Pin
Gideon Engelberth5-Jul-09 12:44
Gideon Engelberth5-Jul-09 12:44 
I think you should look to use the overload of Array.Sort that takes an IComparer(Of T)

The comparer would look something like this (WARNING: code typed directly into the reply)

Friend Class TranslationSorter
  Implements IComparer(Of Translate)

  Public Function Compare(ByVal x as Translate, ByVal y as Translate) as Integer
    'you will need null checks here to decide how to sort in nulls

    'this will use the default sort order for strings
    Return x.English.CompareTo(y.English)
  End Function
End Class

Array.Sort(yourArray, New TranslationSorter)


With this approach, you could add a language property to the TranslationSorter class to make it do other languages.

On an unrelated note, StreamReader has an EndOfStream property instead of needing to do .Peek() >= 0
GeneralRe: Sorting a structure array Pin
Jacob Dixon5-Jul-09 13:52
Jacob Dixon5-Jul-09 13:52 
GeneralRe: Sorting a structure array Pin
Gideon Engelberth5-Jul-09 15:56
Gideon Engelberth5-Jul-09 15:56 
GeneralRe: Sorting a structure array Pin
Jacob Dixon5-Jul-09 15:59
Jacob Dixon5-Jul-09 15:59 
GeneralRe: Sorting a structure array Pin
Luc Pattyn6-Jul-09 0:46
sitebuilderLuc Pattyn6-Jul-09 0:46 

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.