2011-01-20 37 views
35

我有以下代碼:PropertyInfo:屬性索引器?

PropertyInfo[] originalProperties = myType.GetProperties(); 

我想從originalProperties排除所有的索引(myVar的[「鑰匙」]出現物業命名爲「項目」)。

什麼是正確的方法?

排除其中propInfo.Name == "Item"不是所有選項的所有屬性。

回答