Objekt entspricht nicht dem Zieltyp mit C # Reflection

Ich versuche, einen Wert von einem Fenster wie folgt

diese bezieht sich auf die wichtigsten Fenster (window1)

Type type = this.GetType();
PropertyInfo pi = type.GetProperty("Left");
object obj = pi.GetValue(type, null);

Aber bekomme ich eine "Object does not match target-Typ" - Fehler. Was ist falsch?

InformationsquelleAutor der Frage user101375 | 2010-02-11

Schreibe einen Kommentar