I'm writing a WebService in .NET and use a custom type with no public properties. It looks like this:
It is similar to the built-in type Guid
but with special validation rules for MAC addresses. The SOAP description looks like this:
<StringProperty>string</StringProperty>
<GuidProperty>guid</GuidProperty>
<MacAddressProperty />
<!--My aim: <MacAddressProperty>macaddress</MacAddressProperty> -->
My question: Can I create a type like MacAddress
to ensure type-safety and use it as parameter for a WebService? How can I say that the delivered string from the caller should be filled in the parameterized constructor (probably like Guid
works - it has a constructor with a string-parameter)?
Thanks Alex