In the code snippet below, the NotNull annotation is meaningless.
C#
VB.NET
publicvoidSetAge([NotNull]int age){
myAge = age;}
PublicSub SetAge(<NotNull> age AsInteger)
myAge = age
EndSub
The reason is that int cannot possibly be null, so any sort of indication that it is or is not null is redundant and can be removed. The same applies to methods that have a void return type.
Our website uses some cookies and records your IP address for the purposes of accessibility, security, and managing your access to the telecommunication network. You can disable data collection and cookies by changing your browser settings, but it may affect how this website functions. Learn more.
With your consent, JetBrains may also use cookies and your IP address to collect individual statistics and provide you with personalized offers and ads subject to the Privacy Notice and the Terms of Use. JetBrains may use third-party services for this purpose. You can adjust or withdraw your consent at any time by visiting the Opt-Out page.