słowo kluczowe var nie zawsze działa?

C #, VS 2010. Ktoś, proszę, wyjaśnij, dlaczego nie mogę użyćvar w moim kodzie poniżej!

var props = TypeDescriptor.GetProperties(adapter);

// error CS1061: 'object' does not contain a definition for 'DisplayName'
foreach (var prop in props)
{
    string name = prop.DisplayName;
}

// No error
foreach (PropertyDescriptor prop in props)
{
    string name = prop.DisplayName;
}

TypeDescriptor.GetProperties zwraca aPropertyDescriptorCollection z przykładamiPropertyDescriptor. Dlaczego kompilator tego nie widzi?

questionAnswers(5)

yourAnswerToTheQuestion