Sorry that we don't have the built-in functionality for the SLD showin ghere, but I guess you can try “GeoSerializer” Class, and it will serialize Style information into a similar xml format and back, attached is the result we used for test, and following is the sample code:
GeoSerializer geoSerializer = new GeoSerializer();
string serializedString = geoSerializer.Serialize(LineStyles.Highway1);
LineStyle HighWay = (LineStyle)geoSerializer.Deserialize(serializedString);
If any question, feel free to ask!
Layer_XML.txt (2.3 KB)