You can Get Real World Examples Over Here.
You can get Parent element from child element using LINQ method. Some times there are situations when you traverse XML file and you reach at child node and you want to get details of Parent node at that time you can use "Parent" method which will give you parent node as XElement object.
Here is example for this.
In this example we took one "BooksList.xml" file. Now we traverse to child node "Title" and after that, we get its parent node using "Parent" property.
Abstract factory pattern is expanded version of basic factory pattern. In Abstract factory pattern we unite similar type of factory pattern classes in to one unique interface.
Factory classes helps to centralize the creation of classes and types. Abstract factory help bring equability between related factory patterns classes. Which create more simplified interface for the client.
Now let's understand basic details of how to implement abstract factory patterns. We have the factory pattern classes which integrate to a common abstract factory classes through inheritance. Factory classes lay over concrete classes which are derived from common interface. For instance in below figure we demonstrate "Implementation of abstract factory".
(To view original image , click on image)
Both the concrete classes "ConcreateClass1" and "ConcreateClass2" inherits from one common interface. The client has to only interact with the abstract factory and the common interface from which the concrete classes inherit.