Advertisement
Guest User

Untitled

a guest
Jul 20th, 2017
49
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.57 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApplication19
  8. {
  9.     class Address
  10.     {
  11.         public string VFirstName { get; private set; }
  12.         public string VLastName { get; private set; }
  13.         public string VNumberStreet { get; private set; }
  14.         public string VCity { get; private set; }
  15.         public string VState { get; private set; }
  16.         public string VZipcode { get; private set; }
  17.  
  18.         public Address(string FirstName, string LastName, string NumberStreet, string City, String State, string Zipcode)
  19.         {
  20.             VFirstName = FirstName;
  21.             VLastName = LastName;
  22.             VNumberStreet = NumberStreet;
  23.             VCity = City;
  24.             VState = State;
  25.             VZipcode = Zipcode;
  26.         }
  27.  
  28.         public virtual void Display()
  29.         {
  30.             Console.WriteLine("First Name: " + VFirstName + ".");
  31.             Console.WriteLine("Last Name: " + VLastName + ".");
  32.             Console.WriteLine("Number Street: " + VNumberStreet + ".");
  33.             Console.WriteLine("City: " + VCity + ".");
  34.             Console.WriteLine("State: " + VState + ".");
  35.             Console.WriteLine("Zipcode: " + VZipcode + ".");
  36.             Console.WriteLine("");
  37.  
  38.         }
  39.         public bool ContainsWord(string word)
  40.         {
  41.             return VFirstName.Contains(word) || VLastName.Contains(word) || VNumberStreet.Contains(word) || VCity.Contains(word) || VState.Contains(word) || VZipcode.Contains(word);
  42.         }
  43.     }
  44. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement