I am curious if it is possible to create a DataContract that will serialize like so:
<MyCustomName>string value</MyCustomName>
OR
<MyCustomName>int</MyCustomName>
What I am ultimately trying to do is return a basic type with a Custom element name. I've tried the following:
[DataContract(Name = "MyCustomName")]
public class MyCustomName : String
{
}
But obviously you can't inherit a string or int value. Any help would be appreciated.