I want to be able to allow only certain values to a custom object method. The first example that came to mind to illustrate the point is the VB msgbox and the specific values that you use for which set of buttons you could choose.
MsgBox("Message", vbYesNo,"title")
How would I be able to do the same in C# with a custom object?
The method will search a particular area based on the value sent.
object.method(SearchArea1);
object.method(SearchArea2);
I want to be able just type SearchArea1 or SearchArea2 (not as strings) just like you would use vbYesNo, vbCancel.
Does that make sense at all?