How would I create an object that uses String type behaviour for creation?
- by Zachary Spencer
I'd like to be able to create an object that is created like a String object, and when created verifies that the String value is an appropriate option.
I.E. SpecificString can be "Bob" or "Jim".
SpecificString BadName = "Sam" //Throws exception
SpecificString GoodName = "Bob" //Does not throw exception.
Is this possible?