Table of Contents

Class NotNullAttribute

Namespace
Stride.Core.Annotations
Assembly
Stride.Core.dll

Indicates that the value of the marked element could never be null.

[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method|AttributeTargets.Property|AttributeTargets.Field|AttributeTargets.Event|AttributeTargets.Interface|AttributeTargets.Parameter|AttributeTargets.Delegate|AttributeTargets.GenericParameter)]
public sealed class NotNullAttribute : Attribute
Inheritance
NotNullAttribute
Inherited Members

Examples

[NotNull] object Foo() {
  return null; // Warning: Possible 'null' assignment
}