AdvantageCMS.Core.Common.BaseClasses Namespace
Build With Advantage

ObjectDataContractXMLSerializer<(Of <(<'T>)>)>..::..LoadFromString Method

Deserializes an object from an XML string using DataContractSerializer.

Namespace:  AdvantageCMS.Core.Utils
Assembly:  AdvantageCMS.Core (in AdvantageCMS.Core.dll)

Syntax


public static T LoadFromString(
	string xml
)

Parameters

xml
Type: String
The XML string to deserialize.

Return Value

The deserialized object of type T.

Examples


C#
string xml = ObjectDataContractXMLSerializer<UserProfile>.SaveToString(originalProfile);
UserProfile restored = ObjectDataContractXMLSerializer<UserProfile>.LoadFromString(xml);