Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace ConsoleApplication19
- {
- class Address
- {
- public string VFirstName { get; private set; }
- public string VLastName { get; private set; }
- public string VNumberStreet { get; private set; }
- public string VCity { get; private set; }
- public string VState { get; private set; }
- public string VZipcode { get; private set; }
- public Address(string FirstName, string LastName, string NumberStreet, string City, String State, string Zipcode)
- {
- VFirstName = FirstName;
- VLastName = LastName;
- VNumberStreet = NumberStreet;
- VCity = City;
- VState = State;
- VZipcode = Zipcode;
- }
- public virtual void Display()
- {
- Console.WriteLine("First Name: " + VFirstName + ".");
- Console.WriteLine("Last Name: " + VLastName + ".");
- Console.WriteLine("Number Street: " + VNumberStreet + ".");
- Console.WriteLine("City: " + VCity + ".");
- Console.WriteLine("State: " + VState + ".");
- Console.WriteLine("Zipcode: " + VZipcode + ".");
- Console.WriteLine("");
- }
- public bool ContainsWord(string word)
- {
- return VFirstName.Contains(word) || VLastName.Contains(word) || VNumberStreet.Contains(word) || VCity.Contains(word) || VState.Contains(word) || VZipcode.Contains(word);
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement