Click here to Skip to main content
15,899,026 members
Please Sign up or sign in to vote.
3.00/5 (2 votes)
See more:
VB
Dim sbdev As New StringBuilder()
sbdev.Append(CurDir())
sbdev.Append("\")
sbdev.Append(cFolder)
sbdev.Append("\") 

how can i concatenate this in one statment?
Posted
Updated 14-Jun-12 7:54am
v2
Comments
Sergey Alexandrovich Kryukov 14-Jun-12 15:18pm    
Why?!
--SA

VB
Dim sbdev As New StringBuilder()
sbdev.AppendFormat("{0}\{1}\", CurDir(), cFolder)


Though,
VB
System.IO.Path.Combine(CurDir(), cFolder)

might be more appropriate.
 
Share this answer
 
v3
Comments
Maciej Los 14-Jun-12 17:50pm    
Good work, my 5!
Like this:
VB
Dim sbdev As New StringBuilder()
sbdev.Append(CurDir()) & "\" & cFolder & "\") 
sbdev.Append(systemDrive & "Program Files\")
sbdev.Append(systemDrive & "Windows\")
 
Share this answer
 
v2
Comments
Sandeep Mewara 14-Jun-12 16:35pm    
Why downvoted? 5!
Maciej Los 14-Jun-12 17:50pm    
Why? I don't know. Some one doesn't like me?
Thank you, Sandeep ;)
VB
Dim sbDev as string = CurDir() & "\" & cfolder & "\"
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900