I have a large XElement property, and want to know the byte size of it for logging purposes. I don't want to just ToString() it because I have concerns about potentially big strings (not) getting GC'd.
What is a smart/compact way to calculate the XML content of an XElement (.NET 4.0).
Thanks.