<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>C# kódok &#187; abstrakt</title>
	<atom:link href="http://users.atw.hu/csharpkodok/" rel="self" type="application/rss+xml" />
	<link>http://users.atw.hu/csharpkodok</link>
	<description>Csharp kódok gyüjteménye</description>
	<lastBuildDate>Fri, 07 Aug 2009 11:44:01 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Abstrakt osztályok</title>
		<link>http://users.atw.hu/csharpkodok/?p=72</link>
		<comments>http://users.atw.hu/csharpkodok/?p=72#comments</comments>
		<pubDate>Tue, 21 Jul 2009 05:19:03 +0000</pubDate>
		<dc:creator>nameless</dc:creator>
				<category><![CDATA[kód]]></category>
		<category><![CDATA[abstrakt]]></category>

		<guid isPermaLink="false">http://users.atw.hu/csharpkodok/?p=72</guid>
		<description><![CDATA[Abstrakt osztályok (kód) :


using System.Collections.Generic;
using System.Linq;
using System.Text;
&#160;
namespace Shapes
{
    abstract class Shape
    {
        protected string shapeName;
&#160;
        public Shape()
        { shapeName = &#34;Nameless&#34;; }
&#160;
       [...]]]></description>
			<content:encoded><![CDATA[<p>Abstrakt osztályok (kód) :<br />
<span id="more-72"></span></p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">using System.Collections.Generic;
using System.Linq;
using System.Text;
&nbsp;
namespace Shapes
{
    abstract class Shape
    {
        protected string shapeName;
&nbsp;
        public Shape()
        { shapeName = &quot;Nameless&quot;; }
&nbsp;
        public Shape(string name)
        { shapeName = name; }
&nbsp;
        public abstract void Draw();
&nbsp;
&nbsp;
        public string PetName
        {
            get { return shapeName; }
            set { shapeName = value; }
        }
    }
&nbsp;
    class Circle : Shape
    {
        public Circle() { }
        public Circle(string Name) : base(Name) { }
        public override void Draw()
        {
            Console.WriteLine(&quot;Drawing {0} the Circle&quot;, shapeName);
        }
    }
&nbsp;
    class Hexagon : Shape
    {
        public Hexagon() { }
        public Hexagon(string Name) : base(Name) { }
&nbsp;
        public override void Draw()
        {
            Console.WriteLine(&quot;Drawing {0} the Hexagon&quot;, shapeName);
        }
    }
&nbsp;
     class Program
    {
        static void Main(string[] args)
        {
            Shape[] myShape = { new Hexagon(), new Circle(), new Hexagon(&quot;Mick&quot;), new Circle(&quot;Beth&quot;), new Hexagon(&quot;Linda&quot;)};
&nbsp;
            foreach (var s in myShape)
                s.Draw();
&nbsp;
            Console.ReadKey();
        }
}</pre></div></div>

<p>Egy másik kód:</p>

<div class="wp_syntax"><div class="code"><pre class="language" style="font-family:monospace;">using System;
&nbsp;
namespace Shapes
{
    abstract class Shape
    {
        protected string ShapaName;
        public Shape()
        { ShapaName = &quot;nameless&quot;; } 
&nbsp;
        public Shape(string name)
        {
            ShapaName = name;
        }
&nbsp;
        public abstract void Draw();
    }
&nbsp;
    class Circle : Shape
    {
        public Circle()
            : base()
        { }
&nbsp;
        public Circle(string name)
            : base(name)
        { }
&nbsp;
        public override void Draw()
        {
            Console.WriteLine(&quot;I'm in the Circle, it's name is: {0}&quot;,ShapaName);
        }
    }
&nbsp;
    class Hexagon : Shape
    {
        public Hexagon()
            : base()
        { }
&nbsp;
        public Hexagon(string name)
            : base(name)
        { }
&nbsp;
        public override void Draw()
        {
            Console.WriteLine(&quot;I'm in the Hexagon, it's name is: {0}&quot;,ShapaName);
        }
&nbsp;
    }
&nbsp;
    class MainClass
    {
        public static void Main()
        {
            Shape[] myShapes = { new Circle(&quot;Circi&quot;), new Hexagon(&quot;Hexa&quot;), new Circle(&quot;Circi2&quot;),new Hexagon() };
&nbsp;
            foreach (var i in myShapes)
                i.Draw();
&nbsp;
            Console.ReadKey();
        }
    }
}</pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://users.atw.hu/csharpkodok/?feed=rss2&amp;p=72</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
