Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

string length error 1

Status
Not open for further replies.

megalene

Programmer
Jan 4, 2001
31
I am busy converting my ASP code to ASP.NET and I have come accross an error with the LEN() method. Is there a different way to get a string length in .NET? Here is my coded string ::

if Len(asContents) Mod 4 > 0 Then asContents = asContents & String(4 - (Len(asContents) Mod 4), " ")

This is where is errors on saying the folowing ::

Name 'Len' is not declared.

Thanks for any help. Megalene
If you crap it will stink!
 
Object String now has a .length property

dim someString as new string("here is a string")
dim lengthOfString as integer = someString.length

:)
paul
penny1.gif
penny1.gif
 
do you know where i could find a complete syntax listing of the new string object properties and such.
By the way, thanks!! I have been sitting here trying every possible configuration like string.length("something").... Megalene
If you crap it will stink!
 
Do you have msdn installed with VS.Net?

If so search for the string members. This will give a complete listing as well as an explanation for each

alternatively type this into the URL bar of the .Net help browser

ms-help://MS.VSCC/MS.MSDNVS/cpref/html/frlrfsystemstringmemberstopic.htm


Hope that helped
[peace]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top