ToArray method