Click here to Skip to main content
15,909,324 members
Home / Discussions / C#
   

C#

 
AnswerRe: UserCotnrol doubt. Pin
Christian Graus6-Mar-07 0:01
protectorChristian Graus6-Mar-07 0:01 
GeneralRe: UserCotnrol doubt. Pin
pashitech6-Mar-07 3:50
pashitech6-Mar-07 3:50 
GeneralRe: UserCotnrol doubt. Pin
Luc Pattyn6-Mar-07 11:11
sitebuilderLuc Pattyn6-Mar-07 11:11 
QuestionDeployment with ActiveX controller Pin
satsumatable5-Mar-07 23:33
satsumatable5-Mar-07 23:33 
QuestionFire an Event Pin
Abubakarsb5-Mar-07 23:32
Abubakarsb5-Mar-07 23:32 
AnswerRe: Fire an Event Pin
Martin#5-Mar-07 23:58
Martin#5-Mar-07 23:58 
GeneralRe: Fire an Event Pin
Abubakarsb6-Mar-07 0:30
Abubakarsb6-Mar-07 0:30 
GeneralRe: Fire an Event Pin
Russell Jones6-Mar-07 0:36
Russell Jones6-Mar-07 0:36 
GeneralRe: Fire an Event Pin
Abubakarsb6-Mar-07 0:55
Abubakarsb6-Mar-07 0:55 
AnswerRe: Fire an Event Pin
Pete O'Hanlon6-Mar-07 1:42
mvePete O'Hanlon6-Mar-07 1:42 
QuestionDefault value for a combo box Pin
Keshav V. Kamat5-Mar-07 23:26
Keshav V. Kamat5-Mar-07 23:26 
AnswerRe: Default value for a combo box Pin
Frank Kerrigan6-Mar-07 2:31
Frank Kerrigan6-Mar-07 2:31 
GeneralRe: Default value for a combo box Pin
Keshav V. Kamat6-Mar-07 17:05
Keshav V. Kamat6-Mar-07 17:05 
QuestionButton Color C# in WindowsCE Pin
trab0075-Mar-07 22:57
trab0075-Mar-07 22:57 
AnswerRe: Button Color C# in WindowsCE Pin
sam#5-Mar-07 23:15
sam#5-Mar-07 23:15 
GeneralRe: Button Color C# in WindowsCE Pin
trab0075-Mar-07 23:36
trab0075-Mar-07 23:36 
QuestionManipulating a string Pin
Ryno Burger5-Mar-07 22:35
Ryno Burger5-Mar-07 22:35 
AnswerRe: Manipulating a string [modified] Pin
Harini N K5-Mar-07 23:00
Harini N K5-Mar-07 23:00 
AnswerRe: Manipulating a string Pin
Guffa6-Mar-07 0:43
Guffa6-Mar-07 0:43 
AnswerRe: Manipulating a string Pin
Ryno Burger6-Mar-07 2:13
Ryno Burger6-Mar-07 2:13 
AnswerRe: Manipulating a string Pin
Keshav V. Kamat6-Mar-07 16:55
Keshav V. Kamat6-Mar-07 16:55 
Hi.

the following line looks for the character '-' in the string.
the flag checks whether it is true or not.
then it checks where the character is found, and the substrings are taken into other strings.

bool flag=false;

flag=sample.Contains("-");
if(flag==true)
{
int m=sample.IndexOf("-");
string s1 = sample.Substring(0, m); // s1 will contain Object1,Item1,Item2
sample = sample.Remove(0, m+1); // now the sample will contain
//Object2,Item1,Item2-Object3,Item1,Item2
}


Hence you can repeat the procedure to store the other substrings, maybe in a string arraylist.

i hope this helps.

keshav kamat
siemens india
AnswerRe: Manipulating a string Pin
Keshav V. Kamat6-Mar-07 17:00
Keshav V. Kamat6-Mar-07 17:00 
QuestionWord 2007 Ribbon Pin
nibelungster5-Mar-07 22:22
nibelungster5-Mar-07 22:22 
QuestionCan I Connect to an access DB remotely Pin
BraveShogun5-Mar-07 22:15
BraveShogun5-Mar-07 22:15 
AnswerRe: Can I Connect to an access DB remotely Pin
Eduard Keilholz6-Mar-07 2:06
Eduard Keilholz6-Mar-07 2:06 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.