First Character of String ??

tehon3299

Centurion
Joined
Jan 6, 2003
Messages
155
Location
Liverpool, NY
How can I see what the first character of a string is? I am getting a filename via:
Visual Basic:
			Path_ = "C:\Inetpub\wwwroot\SongShare\Songs\"

			Dim sFiles() As String = System.IO.Directory.GetFiles(Path_)
			Dim sFile As String
				sFile = System.IO.Path.GetFileName(sFile)

How can I look at only the first character of the filename in sFile?

Thanks
 
Last edited:
OK...That works great but it doesn't read the character for the first filename and all the files after that are like 1 behind.
I.E. Apple is nothing
Ace is A
Banana is A
Cat is B

What's going on?
 
Remember that arrays are 0 based, so you need to start whatever
loop you're using at 0, not 1. Post some code so we can see.
 
Back
Top