コード例 #1
0
ファイル: Person.cs プロジェクト: melmanm/PeopleInfoStorage
        public string this[string columnName]
        {
            get
            {
                string result = string.Empty;
                switch (columnName)
                {
                case "FirstName": FirstName.GetErrorIfEmpty(ref result); break;

                case "LastName": LastName.GetErrorIfEmpty(ref result); break;

                case "StreetName": StreetName.GetErrorIfEmpty(ref result); break;

                case "PostalCode": PostalCode.GetErrorIfNotPostalCode(ref result); break;

                case "PhoneNumber": PhoneNumber.GetErrorIfNotPhoneNumber(ref result); break;
                }
                return(result);
            }
        }