All pastes #149477 Raw Edit

Shin-Ra

public text v1 · immutable
#149477 ·published 2006-08-25 21:37 UTC
rendered paste body
using System;
using System.Collections.Generic;
using System.Text;

namespace MyShapes
{
	public interface IPoints
	{
		byte Points
		{
			get;
		}
	}
	public class Shape : Object
	{
		public void Draw()
		{
			Console.WriteLine("Drawing a shape");
		}
	}
	public class Circle : Shape, IPoints
	{
		public new void Draw( )
		{
			Console.WriteLine( "Drawing a circle" );
		}

		public byte Points
		{
			get
			{
				return 0;
			}
		}
	}
	public class Triangle : Shape, IPoints
	{
		public new void Draw( )
		{
			Console.WriteLine( "Drawing a triangle" );
		}
		public byte Points
		{
			get
			{
				return 3;
			}
		}
	}
}