Summary
In this chapter, we looked at several techniques for sharing code across platforms. First, we explored the file linking features of Visual Studio and MonoDevelop in order to share entire source files across several projects without having to maintain several copies of them manually. After that, we introduced the abstraction and observer patterns, exploring how they can aid in decoupling an application’s business logic from a particular platform’s implementation. Following that, we looked at how to use partial classes and conditional compilation in order to share sections of a class across platforms, while also allowing for platform-specific modifications. In the remaining chapters, we will apply these techniques while building different applications that dig deeper into some common tasks you might want to perform in your apps, such as accessing the network and persisting data.
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.
Read now
Unlock full access