O'Reilly logo

C# 3.0 Entwurfsmuster by Judith Bishop

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Beispielcode für das Prototyp-Muster – Fotoarchiv

Dies ist der Code für ein Beispiel zum Prototyp-Muster:

Here is an using System; using System.Collections.Generic; using System.IO; using PrototypePattern; namespace CompositePattern { // Namensraum für das Kompositum-Muster // mit den Share-Operationen // Das Interface public interface IComponent <T> { void Add(IComponent <T> c); IComponent <T> Remove(T s); string Display(int depth); IComponent <T> Find(T s); IComponent <T> Share (T s,IComponent <T> home); string Name {get; set;} } // Das Kompositum [Serializable( )] public class Composite <T> : IPrototype <IComponent <T>>, IComponent <T> { List <IComponent <T>> list; public string Name {get; set;} public Composite (string name) { Name = name; ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required