Click here to Skip to main content
15,915,078 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: bit shift operation Pin
nik05070620-Jun-08 7:28
nik05070620-Jun-08 7:28 
GeneralRe: bit shift operation Pin
Guffa20-Jun-08 13:40
Guffa20-Jun-08 13:40 
GeneralRe: bit shift operation Pin
nik05070620-Jun-08 21:20
nik05070620-Jun-08 21:20 
QuestionHow do I use the IBiDiSpl Interface? Pin
Brandon Legault17-Jun-08 7:17
Brandon Legault17-Jun-08 7:17 
Questionstring comparision Pin
Member 183766117-Jun-08 4:06
Member 183766117-Jun-08 4:06 
AnswerRe: string comparision Pin
Helen Bull17-Jun-08 4:10
Helen Bull17-Jun-08 4:10 
AnswerRe: string comparision Pin
Christian Graus17-Jun-08 4:28
protectorChristian Graus17-Jun-08 4:28 
AnswerRe: string comparision Pin
Guffa17-Jun-08 4:37
Guffa17-Jun-08 4:37 
Member 1837661 wrote:
from above, i should get false because v50 is bigger than v1 and v7


No, you shouldn't, as it isn't.

If you want to compare the strings as something other than strings, you can make a custom comparer. For example:

Public Class WeekComparer
Inherits IComparer(Of String)
   Public Sub Compare(x As String, y As String) As Integer
      If x.Chars(0) = "v" and y.Chars(0) = "v" Then
         Return Int32.Parse(x.Substring(1)) - Int32.Parse(y.Substring(1))
      Else
         Return String.Compare(x, y)
      End If
   End Sub
End Class

Usage:
Dim c As New WeekComparer()
If c.Compare(s1, s2) >= 0 And c.Compare(s1, s3) <= 0 Then
   MessageBox.Show("True")
Else
   MessageBox.Show("False")
End If

(Disclaimer: code is not tested and may contain minor errors.)

Despite everything, the person most likely to be fooling you next is yourself.

AnswerRe: string comparision Pin
Luc Pattyn17-Jun-08 12:46
sitebuilderLuc Pattyn17-Jun-08 12:46 
QuestionProblem accessing Application Event Log programatically Pin
Helen Bull17-Jun-08 3:58
Helen Bull17-Jun-08 3:58 
AnswerRe: Problem accessing Application Event Log programatically Pin
Noctris18-Jun-08 3:21
Noctris18-Jun-08 3:21 
GeneralRe: Problem accessing Application Event Log programatically Pin
Helen Bull20-Jun-08 2:29
Helen Bull20-Jun-08 2:29 
QuestionWebBrowser control Session issue ? Pin
imran_rafique17-Jun-08 3:43
imran_rafique17-Jun-08 3:43 
AnswerRe: WebBrowser control Session issue ? Pin
Noctris18-Jun-08 3:24
Noctris18-Jun-08 3:24 
Questionproblem wit autentication Pin
Ebube17-Jun-08 3:18
Ebube17-Jun-08 3:18 
AnswerRe: problem wit autentication Pin
Christian Graus17-Jun-08 3:27
protectorChristian Graus17-Jun-08 3:27 
Questionhow can change the LeftMost dimension of an array Pin
Rupesh Kumar Swami17-Jun-08 2:50
Rupesh Kumar Swami17-Jun-08 2:50 
AnswerRe: how can change the LeftMost dimension of an array Pin
Christian Graus17-Jun-08 3:01
protectorChristian Graus17-Jun-08 3:01 
GeneralRe: how can change the LeftMost dimension of an array Pin
Rupesh Kumar Swami17-Jun-08 3:34
Rupesh Kumar Swami17-Jun-08 3:34 
GeneralRe: how can change the LeftMost dimension of an array Pin
Christian Graus17-Jun-08 4:30
protectorChristian Graus17-Jun-08 4:30 
GeneralRe: how can change the LeftMost dimension of an array Pin
Guffa17-Jun-08 12:22
Guffa17-Jun-08 12:22 
QuestionOn Enter Button1 is clicked Pin
Assaf8217-Jun-08 2:04
Assaf8217-Jun-08 2:04 
AnswerRe: On Enter Button1 is clicked Pin
Christian Graus17-Jun-08 2:08
protectorChristian Graus17-Jun-08 2:08 
GeneralRe: On Enter Button1 is clicked Pin
Assaf8217-Jun-08 2:12
Assaf8217-Jun-08 2:12 
GeneralRe: On Enter Button1 is clicked Pin
Christian Graus17-Jun-08 2:26
protectorChristian Graus17-Jun-08 2:26 

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.