采取以下场景:
Public Class Store
Public Overridable Property Areas As List(Of Area)
End Class
Public Class Area
Public Overridable Property Shelves As List(Of Shelf)
End Class
Public Class Shelf
Public Property ID as integer
End Class
获取商店货架总数的最快方法是什么?即对于一家商店,我使用 Areas.Count 获得区域的总数
还是我需要遍历每个区域并计算货架的数量?