Click here to Skip to main content
15,888,454 members
Home / Discussions / Visual Basic
   

Visual Basic

 
QuestionNeed to find html tags in strings Pin
Amir Tallap22-Jun-14 16:49
Amir Tallap22-Jun-14 16:49 
AnswerRe: Need to find html tags in strings Pin
thatraja22-Jun-14 22:10
professionalthatraja22-Jun-14 22:10 
QuestionError Trying to connect to a database after restoring Pin
dilkonika22-Jun-14 11:17
dilkonika22-Jun-14 11:17 
AnswerRe: Error Trying to connect to a database after restoring Pin
Eddy Vluggen23-Jun-14 7:12
professionalEddy Vluggen23-Jun-14 7:12 
GeneralRe: Error Trying to connect to a database after restoring Pin
dilkonika23-Jun-14 8:24
dilkonika23-Jun-14 8:24 
GeneralRe: Error Trying to connect to a database after restoring Pin
Eddy Vluggen25-Jun-14 8:15
professionalEddy Vluggen25-Jun-14 8:15 
QuestionWhy does this Array.FindIndex for case insensitive return 2 not 0 Pin
QuickBooksDev21-Jun-14 4:15
QuickBooksDev21-Jun-14 4:15 
AnswerRe: Why does this Array.FindIndex for case insensitive return 2 not 0 Pin
Dave Kreskowiak21-Jun-14 5:38
mveDave Kreskowiak21-Jun-14 5:38 
It says 2 because you're asking the FindIndex function to return the first element where the x.IndexOf call returns a non-zero value, and that's at index = 2.

In most languages, a non-zero value is always considered True and a zero value is False.

Read up on the IndexOf() and String.Compare() documentation and you'll understand why it's not behaving like you think it should.

To get it to work like you want, you'd change that line of code to:
i = Array.FindIndex(pAR, Function(x) x.IndexOf(s, StringComparison.InvariantCultureIgnoreCase) = 0)


GeneralRe: Why does this Array.FindIndex for case insensitive return 2 not 0 Pin
QuickBooksDev22-Jun-14 1:14
QuickBooksDev22-Jun-14 1:14 
GeneralRe: Why does this Array.FindIndex for case insensitive return 2 not 0 Pin
Dave Kreskowiak22-Jun-14 5:18
mveDave Kreskowiak22-Jun-14 5:18 
SuggestionRe: Why does this Array.FindIndex for case insensitive return 2 not 0 Pin
Richard Deeming23-Jun-14 2:16
mveRichard Deeming23-Jun-14 2:16 
GeneralRe: Why does this Array.FindIndex for case insensitive return 2 not 0 Pin
Dave Kreskowiak23-Jun-14 2:42
mveDave Kreskowiak23-Jun-14 2:42 
GeneralRe: Why does this Array.FindIndex for case insensitive return 2 not 0 Pin
Richard Deeming23-Jun-14 11:09
mveRichard Deeming23-Jun-14 11:09 
GeneralRe: Why does this Array.FindIndex for case insensitive return 2 not 0 Pin
Dave Kreskowiak23-Jun-14 11:16
mveDave Kreskowiak23-Jun-14 11:16 
QuestionIs there a TimeZoneInfo in VB.NET 2005 Pin
hansoctantan20-Jun-14 3:12
professionalhansoctantan20-Jun-14 3:12 
AnswerRe: Is there a TimeZoneInfo in VB.NET 2005 Pin
Richard Deeming20-Jun-14 4:00
mveRichard Deeming20-Jun-14 4:00 
QuestionRun Program from Within Folder Pin
Parament Technologies18-Jun-14 16:44
Parament Technologies18-Jun-14 16:44 
AnswerRe: Run Program from Within Folder Pin
Dave Kreskowiak18-Jun-14 17:32
mveDave Kreskowiak18-Jun-14 17:32 
GeneralRe: Run Program from Within Folder Pin
Parament Technologies18-Jun-14 17:45
Parament Technologies18-Jun-14 17:45 
GeneralRe: Run Program from Within Folder Pin
Dave Kreskowiak19-Jun-14 2:06
mveDave Kreskowiak19-Jun-14 2:06 
GeneralRe: Run Program from Within Folder Pin
Parament Technologies19-Jun-14 4:10
Parament Technologies19-Jun-14 4:10 
GeneralRe: Run Program from Within Folder Pin
Dave Kreskowiak19-Jun-14 4:30
mveDave Kreskowiak19-Jun-14 4:30 
GeneralRe: Run Program from Within Folder Pin
Parament Technologies19-Jun-14 5:59
Parament Technologies19-Jun-14 5:59 
GeneralRe: Run Program from Within Folder Pin
Dave Kreskowiak19-Jun-14 9:49
mveDave Kreskowiak19-Jun-14 9:49 
GeneralRe: Run Program from Within Folder Pin
Eddy Vluggen19-Jun-14 5:14
professionalEddy Vluggen19-Jun-14 5:14 

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.