NotNull attribute

The NotNullAttribute is gone. It was replaced with conditionally throwing ArgumentNullException and subsequently removed by the ASP.NET team. As of Jan 12, 2016 there's no plan to bring it back. (At that time, I was working on the ASP.NET team.)


The attribute will be replaced through a pre-compilation step, using Roslyn, by code that does the actual check.

However, the feature is not yet ready as of Jun 17, 2015. It will come in a later version. So far, it is just an empty internal attribute that should be implemented in each project again:

[AttributeUsage(AttributeTargets.Parameter, AllowMultiple = false)]
internal sealed class NotNullAttribute : Attribute
{
}