Kopano Choane

Kopano Choane

  • 1.9k
  • 8
  • 2.7k

Strongly typed collection

Apr 23 2013 2:23 AM
Good Morning

Lets I want to validate something inside a property...

private string _phoneType;

public string PhoneType
        return _phoneType;
         _phoneType = value;

valid values for PhoneType are: "Home", "Mobile" and "Work". If an invalid value
is supplied, an ArgumentOutOfRangeException must be thrown using the 5th
overload with 3 parameters, with meaningful messages

Please explain what that above statement mean.

Brought to you by: JavaScript SDK for Bold BI dashboard and analytics embedding. Free trial.

Answers (3)