lundi 3 août 2015

C# System.Type doesn't contains GetProperties() [duplicate]

This question already has an answer here:

I created an Universal App which uses SQLite. Then I created a method which uses GetType().GetProperties() My problem is that in a previous version of my app(not universal), I used this method and it worked perfectly, now i can't use him couse the Type Class doesn't contains it.

I checked the System.Type class and this was the header of the working one:

#region Assembly mscorlib.dll, v2.0.5.0
// C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\WindowsPhone\v8.0\mscorlib.dll
#endregion

using System.Globalization;
using System.Reflection;
using System.Security;

And this is the header of the Universal App's one:

    #region Assembly System.Runtime.dll, v4.0.10.0
// C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\WindowsPhoneApp\v8.1\System.Runtime.dll
#endregion

using System.Security;

The second doesn't contain GetMethod, or GetProperties, or a lot of other methods.

The only difference is that the universal app had 8.1 as destination and Windows phone app has 8.0. Any ideas on how to use Type.GetProperties() method?

Aucun commentaire:

Enregistrer un commentaire