Skip to Content
Design Patterns in .NET: Reusable Approaches in C# and F# for Object-Oriented Software Design
book

Design Patterns in .NET: Reusable Approaches in C# and F# for Object-Oriented Software Design

by Dmitri Nesteruk
May 2019
Intermediate to advanced content levelIntermediate to advanced
356 pages
5h 18m
English
Apress
Content preview from Design Patterns in .NET: Reusable Approaches in C# and F# for Object-Oriented Software Design
© Dmitri Nesteruk 2019
Dmitri NesterukDesign Patterns in .NEThttps://doi.org/10.1007/978-1-4842-4366-4_23

23. Strategy

Dmitri Nesteruk1 
(1)
St. Petersburg, c.St-Peterburg, Russia
 
Suppose you decide to take an array or vector of several strings and output them as a list:
  • just

  • like

  • this

If you think about the different output formats, you probably know that you need to take each element and output it with some additional markup. In the case of languages such as HTML or LaTeX, though, the list will also need start and end tags or markers.

We can formulate a strategy for rendering a list:
  • Render the opening tag or element.

  • For each of the list items, render that item.

  • Render the closing tag or element.

Different strategies can be formulated for different output ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Design Patterns in .NET 6: Reusable Approaches in C# and F# for Object-Oriented Software Design

Design Patterns in .NET 6: Reusable Approaches in C# and F# for Object-Oriented Software Design

Dmitri Nesteruk
Hands-On Design Patterns with C# and .NET Core

Hands-On Design Patterns with C# and .NET Core

Gaurav Aroraa, Jeffrey Chilberto

Publisher Resources

ISBN: 9781484243664Purchase LinkPublisher Website