62,269
社区成员
发帖
与我相关
我的任务
分享
private static object _SyncRoot = new object();
private static List<Category> _Categories;
/// <summary>
/// Gets an unsorted list of all Categories.
/// </summary>
public static List<Category> Categories
{
get
{
if (_Categories == null)
{
lock (_SyncRoot)
{
if (_Categories == null)
{
_Categories = BlogService.FillCategories();
_Categories.Sort();
}
}
}
return _Categories;
}
}
if (_Categories == null)
{
lock (_SyncRoot)
{
if (_Categories == null)
if (_Categories == null)
{
if (_Categories == null)
{
_Categories = BlogService.FillCategories();
_Categories.Sort();
}
}
return _Categories;
}