0
選一個會如何排序使用LINQ以下方法Sitecore的子項的列表,並轉換/鑄造的「排序列表」回Sitecore.Data.Items.Item[]
:Sitecore的項目/分項使用LINQ
...
Sitecore.Data.Items.Item[] subitems = current.SelectItems(query);
var sortedList = (from entry in subitems orderby entry.Fields["Title"].Value ascending select entry);
...
注:我嘗試在查詢中對其進行排序失敗。
約定的價值,更安全訪問字段值這種方式。 –
沒有機會爲可以爲空的字段獲取空引用異常。 – Younes