i am gettting this pattern want only the number other than 0 how to get
str = 1,1,1,1,0 what i need is str = 1,1,1,1
str = 0,1,0,0,0 str = 1
how to get this
i am gettting this pattern want only the number other than 0 how to get
str = 1,1,1,1,0 what i need is str = 1,1,1,1
str = 0,1,0,0,0 str = 1
how to get this
Hi,
Another solution:
String.Join(",",yourString.Split(","c).Where(Function(s) s<>"0"))
This will work even if there is 2 digits number such as 10.
Regards,
please share it with us (also feel free to show us some more details on your imp) Thanks
you ommited the seperator character argument part
String.Join( ",",values.....
Please read / check carefully
String.Join(",",values.Replace("0","").Where(Function(x) Char.IsDigit(x)))
we assume values is your variablename