Windows 8.1 ve Windows Phone 8.1 için bir Windows Evrensel Uygulaması yapmaya çalışıyorum. İşte Reflection.Typeinfo/Reflection.Type GetProperties/GetFields yöntemine sahip değil
benim sorunun bir örnek sınıfı, ben bir örnek olarak int türünü kullanıyorum, ama hata olursa olsun sınıfın var kullandığım:using System;
using System.Collections.Generic;
using System.Reflection;
using System.Text;
namespace myTtrpgHelper
{
class testClass
{
void testMethod()
{
int c = new int();
Type type = c.GetType();
TypeInfo typeInfo = IntrospectionExtensions.GetTypeInfo(type);
PropertyInfo[] p = typeInfo.GetProperties();
PropertyInfo[] p2 = type.getProperties();
PropertyInfo[] p3 = typeInfo.GetFields();
PropertyInfo[] p4 = type.GetFields();
}
}
}
GetProperties ve GetFields hem görüntüleme hataları :
'System.Reflection.TypeInfo' does not contain a definition for 'GetFields' and no extension method 'GetFields' accepting a first argument of type 'System.Reflection.TypeInfo' could be found (are you missing a using directive or an assembly reference?)
http://msdn.microsoft.com/en-us/library/system.reflection.typeinfo.aspx o desteklenmelidir diyor msdn sayfa, ben Senkullanmalıdır görsel stüdyo 2013
Başlığınızı düzenledim. Lütfen, "[Sorular soruların başlığında" etiketler içeriyor mu? "(Http://meta.stackexchange.com/questions/19190/)" bölümüne bakacak olursak, fikir birliği "hayır, yapmamalı" dır. –