How to format this string in c#
- by Rohit
I have a setting stored in database which has a value .jpg|.gif|.png . I want to display it on frontend as ".jpg",".gif" and ".png" in a single string. for example
Allowed formats are ".jpg",".gif" and ".png"
I was able to seperate it using
string fileTypes = String.Join(",", supportedFileTypes.Split('|'))
How to specify and clause before the last string. It has to be dynamic. For example if we have .jpg|.gif in database, it should be
Allowed formats are ".jpg" and ".gif".