Link to home
Start Free TrialLog in
Avatar of r3nder
r3nderFlag for United States of America

asked on

Trimend() issues

I am tring to trim an string from a string builder but it is not trimming the character
 StringBuilder sb = new StringBuilder();
            if (emailSent == 1)
            {
                ListViewSelectedItemCollection col = radlvEmp.SelectedItems;

                
                foreach (ListViewDataItem item in col)
                {
                    sb.Append(Convert.ToString(item.Value) + ", ");
                }
                
            }
            string s = sb.ToString();
            s = s.ToString().Trim();
            s.TrimEnd(',');

Open in new window

the value is still me.me@yahoo.com,
Avatar of p_davis
p_davis

s = s.TrimEnd(',');
ASKER CERTIFIED SOLUTION
Avatar of p_davis
p_davis

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of r3nder

ASKER

Thanks P_davis
didnt see that
you're welcome.... I've done it many times.