RSS Forums RSS
Please support our VB.NET advertiser: Programming Forums

LEFT syntax

Join Date: Apr 2007
Posts: 5
Reputation: Albert88 is an unknown quantity at this point 
Rep Power: 0
Solved Threads: 0
Albert88 Albert88 is offline Offline
Newbie Poster

LEFT syntax

  #1  
Apr 28th, 2007
I have a problem with "left"syntax
when i operate it in console application, it works
but when i operate it in windows application, the left syntax is error...
this is my code, can someone check my code please

' get and validate order no
Dim strOrderNo As String = _ ValidateOrderNumber(txtOrderNumber.Text)
If strOrderNo = "" Then
MessageBox.Show("Error: Invalid Order Number")
With txtOrderNumber
.SelectAll()
.Focus()
End With
Return
End If

Private Function ValidateOrderNumber(ByRef strOrderNo As String) _ As String

strOrderNo = strOrderNo.ToUpper

If Left(strOrderNo, 2) <> "SO" Then
' returns an empty string to denote error
Return ""
End If

' return valid order no
Return strOrderNo
End Function

the description say that 'Public Property Left() As Integer' has no parameters and its return type cannot be indexed.


can someone help me please..............
thanks
AddThis Social Bookmark Button
Reply With Quote  
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 1:45 am.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC