The statement A key cannot be a null reference (Nothing in Visual Basic), but a value can be, if TValue is a reference type, is not entirely correct. If TValue is a nullable value type, then it can also be a null reference (Nothing in Visual Basic).
The following example shows this:
[C#]
using System;
using System.Collections.Generic;
namespace Samples
{
class Program
{
static void Main(string[] args)
{
Dictionary<string, int?> dictionary = new Dictionary<string, int?>();
dictionary.Add("Value", null);
}
}
}