The whole point of creating a class library project is reusability. Now we want this reusability not only within a .NET application, not across .NET applications, but across different types of .NET applications. Now different types of .NET applications means WPF, Windows, Silverlight, Windows phone, etc.
![Image 1](/KB/Blogs/647001/cl.png)
Now each one of these applications run on different platforms and have different flavors of .NET Frameworks. For example, Silverlight application runs inside a browser and has a downsized version of .NET.
So in a Silverlight application, if you try to reference a simple “Class project”, you would end up with the below error. That’s where portable class libraries are useful. By creating a portable class, we can reference it in any kind of .NET project types.
![Image 2](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
To create a portable class, we need to use the portable class template which is available in Visual Studio as shown in the below figure:
![Image 3](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
Below is a simple youtube video which demonstrates what is a Portable Class library in C#.
![Image 4](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
CodeProject
For further reading do watch the below interview preparation videos and step by step video series.