-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
'Constructors' for alternate data formats #34
Comments
|
This is perfect. I don't know why I didn't figure it out. Thank you for your quick response. This is a great and useful package. Thank you for your work in making it available to us. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello,
I'm new to ValueOf so this may be a basic question, but it there a way of creating an object with alternative data formats? For example I would like to represent a telephone number as a long, but I also want to be able to create the object using a string.
So I would like to accept:
1234567890 (long)
But I would also like to create the object using
(123)456-7890 (string)
or 123-456-7890 (string)
or +1 123-45-6789 (string).
In all cases, the actual data would be represented as a long.
I realize that I'm supposed to create the object using TelephoneNumber.From(1234567890)
but can I have the alternate constructors?
Thank you
The text was updated successfully, but these errors were encountered: