C#C
C#2y ago
Brokemia

Getting the Value of XElement including tags

I have an XElement and I want to get its value, including any child elements of it expressed as tags.
So for example, I have
<test>1<a>2</a>3</test>

And I want to get
1<a>2</a>3
as a string.
What's an easy way to do that?
Was this page helpful?