Search code examples
windows-phone-7windows-store-appswindows-phone-8portable-class-library

Can I use the "dynamic" keyword in a Portable Class Library?


I'm creating a portable class library that is targeting :

  1. .NET 4.5
  2. Windows Store Apps
  3. Windows Phone 7.5+
  4. Silverlight 5

Can I safely use the "dynamic" keyword in that library?


Solution

  • Projects targeting Windows Phone 7.5 cannot use "dynamic" - it lacks both the types and runtime support. However, the above combination will work if you change Phone 7.5 to Phone 8