I know generally empty List is more prefer than NULL. But I am going to return NULL, for mainly two reasons
As everyone else has said, nothing is built into the framework, but if you are using Castle then Castle.Core.Internal has it.
using Castle.Core.Internal;
namespace PhoneNumbers
{
public class PhoneNumberService : IPhoneNumberService
{
public void ConsolidateNumbers(Account accountRequest)
{
if (accountRequest.Addresses.IsNullOrEmpty()) // Addresses is List
{
return;
}
...