All pastes #906540 Raw Edit

RickyWh

public text v1 · immutable
·published 2008-02-16 19:55 UTC
rendered paste body
using System;
using System.Collections.Generic;
using System.Text;

namespace TESTconsoleApp
{
    public class Starter
    {
        public static void Main()
        {
            MainClass ricky = new MainClass("Ricky Mossip", "Some basic info");

            Cat krystal = new Cat("4 limbs", 5, 2);
            Cat saboo = new Cat("4 limbs", 6, 2);

            Console.WriteLine("{0}", Object.Equals(saboo, krystal));
        }
    }

    public class MainClass : InClass
    {
        public string name;

        public MainClass(string passedName, string passedInfo)
        {
            this.name = passedName;
            this.info = passedInfo;
            Console.WriteLine("{0} & {1}", this.name, this.info); 
        }
    }

    public class InClass
    {
        public string info;
    }

    public class Cat
    {
        public string limbs;
        public int age;
        public int ears;

        public Cat(string pLimbs, int pAge, int pEars)
        {
            this.limbs = pLimbs;
            this.age = pAge;
            this.ears = pEars;
            Console.WriteLine("A new cat was created with {0}. This cat is {1} years old and has {2} ears.", this.limbs, this.age, this.ears);
        }
    }
}