I have requirement like iam taking value of count =1 in if condition and when condition matches 1value =1 it will come in then condition and 2value =2 , i want the 1value of then part should be concatenated with 2value with comma separated…and 3value should be concatenated with 1value,2value,3value
Can you share sample input and output ?
You can try with two methods for this,
1. String Concatenation Function
This will help you to append strings whenever required. Example as below.
stringOutput = stringOutput + "1value"
2. String List
Add all your strings to be concatenated into a list of string & then the same can be joined with a separator
stringOutput = String.Join(",",listStrings)
Hope this helps