how to use wherecanaccess function through c# in Umbraco 5.1
===

I am using Umbraco 5.1 for learning management system.
and I need to check weather member has access to a content or not for that i am trying to use wherecanacess function but not able to access.
please tell me how to use wherecanaccess funtion in C# file. 

    public DynamicContentList WhereCanAccess()
            {
                var currentMember = _membershipService.GetCurrent();
                var filteredIds = _containedIds.FilterWithPublicAccess(currentMember, _publicAccessService).ToList();
                return new DynamicContentList(_sourceId, _hiveManager, _membershipService, _publicAccessService, _defaultValueIfNull, 
                    filteredIds);
            }

    

public DynamicContentList WhereCanAccess(HiveId memberId)
    {
        var filteredIds = _containedIds.FilterWithPublicAccess(memberId, _publicAccessService);
        return new DynamicContentList(_sourceId, _hiveManager, _membershipService, _publicAccessService, _defaultValueIfNull, 
            filteredIds);
    }