Created
May 2, 2012 21:37
-
-
Save sclarson/2580699 to your computer and use it in GitHub Desktop.
Url Serialization
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[XmlIgnore] | |
public Uri Url { get; set; } | |
[XmlAttribute("uri")] | |
[Browsable(false), EditorBrowsable(EditorBrowsableState.Never)] | |
public string UriString | |
{ | |
get { return Url == null ? null : Url.ToString(); } | |
set { Url = value == null ? null : new Uri(value); } | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment