Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Logic help
Message
From
27/05/2010 08:43:07
Cetin Basoz
Engineerica Inc.
Izmir, Turkey
 
General information
Forum:
ASP.NET
Category:
Coding, syntax and commands
Title:
Environment versions
Environment:
VB 9.0
Miscellaneous
Thread ID:
01466186
Message ID:
01466213
Views:
48
>Hi all,
>
>It is late and my brain is not functioning... based on the following example the If statement should set my array but it does not...
>
>
>Dim i As Integer = 0
>Dim oReturn As Array = Array.CreateInstance(GetType(String), 5)
>
>mAddress1 = "744 MILLER DR"
>mCity = ""
>
>If (Not mAddress1.Trim().Equals(String.Empty)) And (Not mAddress1.Trim().StartsWith(mCity.Trim())) Then
>                oReturn.SetValue(mAddress1.Trim(), i)
>                i = i + 1
>End If
>
>
>
>Thank you,
>Daniel

What is that you are trying to do? According to that if() there is nothing to set because second part is False (mAddress1 StartsWith ""). Maybe you meant:
If (Not mAddress1.Trim().Equals(String.Empty)) And (mAddress1.Trim().StartsWith(mCity.Trim())) Then
Cetin
Çetin Basöz

The way to Go
Flutter - For mobile, web and desktop.
World's most advanced open source relational database.
.Net for foxheads - Blog (main)
FoxSharp - Blog (mirror)
Welcome to FoxyClasses

LinqPad - C#,VB,F#,SQL,eSQL ... scratchpad
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform