Advertisement
TankorSmash

Untitled

Aug 3rd, 2012
103
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 1.04 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading;
  6.  
  7. namespace TammyFranklin
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             //Intro to the app
  14.             Console.Title = "Tamso";
  15.             Console.BackgroundColor = ConsoleColor.DarkGreen;
  16.             Console.ForegroundColor = ConsoleColor.Yellow;
  17.            
  18.             //Console.WriteLine(tami.ToString());
  19.             Pet bird = new Pet();
  20.  
  21.             //Wait for Key on exit
  22.             Console.ReadKey();
  23.         }
  24.     }
  25.  
  26.     class Pet
  27.     {
  28.         //pet details
  29.         public string name;
  30.  
  31.         public Pet()
  32.         {
  33.             Console.WriteLine("What is the pet's name?");
  34.             this.name = Console.ReadLine();
  35.             Console.WriteLine("This is the pets name {0} {1}", this.name, name);
  36.         }
  37.         public void sec(string  goat){
  38.             this.name = goat;
  39.             Console.WriteLine("Pets new name: {0}", name);
  40.         }
  41.     }
  42. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement