473,480 Members | 1,876 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

string concatination problem

I've an ArrayList with the the values shown below:

[0]: "ComputerServices"
[1]: "Documents"
[2]: "BIG Folder"

I want to turn the arraylist into ComputerServices/Documents/BIG Folder/

Here is what i am doing..

for(int i=0; i < arrPath.Count; i++)
{
FilePath +=arrPath[i].ToString()+"/";
}

The problem i have is i am getting ComputerServices/Documents/BIG
from FilePath variable.. anything after the space is not added.. why?

Many thanks
Jul 21 '05 #1
2 1715
How is the arraylist being populated? Can you show that code?

Jul 21 '05 #2
huzz <hu**@discussions.microsoft.com> wrote:
I've an ArrayList with the the values shown below:

[0]: "ComputerServices"
[1]: "Documents"
[2]: "BIG Folder"

I want to turn the arraylist into ComputerServices/Documents/BIG Folder/

Here is what i am doing..

for(int i=0; i < arrPath.Count; i++)
{
FilePath +=arrPath[i].ToString()+"/";
}

The problem i have is i am getting ComputerServices/Documents/BIG
from FilePath variable.. anything after the space is not added.. why?


My guess is that you're looking in the debugger, and the value isn't
actually a space, but a Unicode null character (0).

Could you post a short but complete program which demonstrates the
problem?

See http://www.pobox.com/~skeet/csharp/complete.html for details of
what I mean by that.

--
Jon Skeet - <sk***@pobox.com>
http://www.pobox.com/~skeet
If replying to the group, please do not mail me too
Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

37
4649
by: Kevin C | last post by:
Quick Question: StringBuilder is obviously more efficient dealing with string concatenations than the old '+=' method... however, in dealing with relatively large string concatenations (ie,...
2
4330
by: HumanJHawkins | last post by:
The following query works perfectly (returning all words on a list called "Dolch" that do not contain a form of "doing"): SELECT 'Dolch' AS , dbo.Dolch.vchWord FROM dbo.Dolch LEFT OUTER JOIN...
5
1359
by: Alpha | last post by:
Is there any way to create a new column in a dataset table from 2 string column and a int column? I got an error "expecting string" from my code below. Any help would be appreciated. ...
2
1928
by: Boni | last post by:
Hi all, String *A="kkkj" String *B="kkkj" Is there something easier then String *C=String::Concat(A,B) Why can't it just be as in C# C=A+B. Thanks, Boni
8
4332
by: Two Beards | last post by:
Hi, I'm new to VB and .net so I may be mising something. I am trying to dynamically build some SQL by appending to a string. Part of the SQL comes from an mp3 id tag I have extracted from a file...
23
6203
by: Bonj | last post by:
what is the correct form of string concatenation in VB.NET, + or &? Both seem to work, but which is correct? I know it's + in C# and & in VB6, but which in VB.NET?
2
294
by: huzz | last post by:
I've an ArrayList with the the values shown below: : "ComputerServices" : "Documents" : "BIG Folder" I want to turn the arraylist into ComputerServices/Documents/BIG Folder/ Here is what i...
16
2120
by: Mark A. Sam | last post by:
Hello, I am having a problem with imputting into a string variable: Dim strSQL As String = "INSERT INTO tblContactForm1 (txtName, txtCompany, txtPhone, txtEmail, txtComment, chkGrower,...
0
2317
by: pradeep | last post by:
Hello, I have problem in PHP String concatination with html select combo box. There are 3 files addressbook.sql : concat1.php concat2.php
0
7054
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
6918
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
7003
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
1
4798
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4495
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3008
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
1310
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
1
570
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
0
199
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.