See the discussion in #35725, specifically this comment: #35725 (comment).
We should change the C# generation to special case XElement (just like we did for the IL generation case), and have it generate new XElement("default") instead of calling Activator.CreateInstance. Using private reflection can easily be broken in the future, so we shouldn't rely on it.
See the discussion in #35725, specifically this comment: #35725 (comment).
We should change the C# generation to special case XElement (just like we did for the IL generation case), and have it generate new XElement("default") instead of calling
Activator.CreateInstance. Using private reflection can easily be broken in the future, so we shouldn't rely on it.