O'Reilly logo

Xamarin Essentials by Mark Reynolds

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

Portable Class Libraries

Portable Class Libraries (PCL) are libraries that conform to a Microsoft standard and can be shared in a binary format across many different platforms such as Windows 7 desktop, Windows 8 desktop, Windows 8 phone, Xbox 360, and Mono. The big advantage with a PCL is that you can share a single binary for all these platforms and avoid distributing source code. However, there are some significant challenges.

One issue we face straightaway is the fact that our code uses APIs that are not supported across all the platforms; specifically File.Exists(), File.ReadAllText(), and File.WriteAllText(). It seems surprising, but most of System.IO is not common across all of the .NET profiles; so, the file I/O logic can be difficult ...

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