Click here to Skip to main content
15,904,416 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
string contain 3 values like abc,def,"" then how to replace "" value with empty or blank value.
Posted

1 solution

Like this, assuming that stringValues is your array:

C#
foreach(var s in stringValues)
{
    if(string.IsNullOrWhiteSpace(s))
    {
        s = string.Emtpy;
    }
}
 
Share this answer
 
Comments
ravijain03 6-Nov-12 6:25am    
sqlparam.value contain those three value then how the last value or "" value replace with empty string
jim lahey 6-Nov-12 6:27am    
you never mentioned sqlparameters in your original post.

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