Click here to Skip to main content
16,022,413 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
C#
ArrayList al = new ArrayList();

string name="my name is tanzeel and my complete name is TANZEEL ahmed"
C#
for (int i = 0; i < name.Length; i += name.ToLower().IndexOf("tanzeel") + 7)
{
    int a = name.ToLower().IndexOf("tanzeel", i);
    al.Add((string)(name.Substring(a, 7)));
}

now in this program i have stored the name tanzeel as it is in the string since in my string it comes 2 times one with small letter tanzeel and other starting with capital letter. so i have stored them as it is in an array. now i want to replace the same word from an array means first time a word with small letter tanzeel and then where it finds TANZEEL should replace with starting with capital letter TANZEEL as stored in an array. Is there any way?
Posted
Updated 31-Mar-10 20:28pm
v2

1 solution

Array List to array - use the ToArray() method on your ArrayList.

You need to write your own logic to search for lower case / upper case letters.
 
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