- $ tag should replace with -"$" should come for ordered list and " | " for unordered list
- ", "|").Replace("
- ", "").Replace("
- "))
{
Value = Value.Replace("
- ", "$").Replace("
- ", "").Replace("
", "").Replace("
", "").Replace("
", ""); } - ", "$").Replace("
- tag should replace with -"$" should come for ordered list and " | " for unordered list
above mentioned tag should add in existing below code
if (!string.IsNullOrEmpty(Value))
{
if (Value.Contains(""))
{
Value = Value.Replace("
Jayraj ChhayaPosted Dec 15, 2023, 10:43 AM
To replace the specified tags with the desired tags in the given C# console application code, you can use the
Replacemethod of thestringclass. Here's an updated version of the code that includes the necessary replacements:In this code, the
Replacemethod is used to replace the opening and closing tags of the ordered lists (
,) and the list of items (,) with the desired tags ($for ordered lists and|unordered lists). TheContainsmethod checks if the text contains the specific tags before performing the replacements.