How to format this string in c#
Posted
by Rohit
on Stack Overflow
See other posts from Stack Overflow
or by Rohit
Published on 2010-03-25T09:54:33Z
Indexed on
2010/03/25
10:03 UTC
Read the original article
Hit count: 434
c#
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".
© Stack Overflow or respective owner