Home > Net >  Parameters in front of the property [NotNull] and [CanBeNull] what's the use of respectively?
Parameters in front of the property [NotNull] and [CanBeNull] what's the use of respectively?

Time:12-03

One way is like this:
 

Public static void Main ()
{
The Test (null, null);
Test (" a ", "b");
}
Public static void Test (
[NotNull] string test1,
[CanBeNull] string test2)
{

}

In the inside, what are these two properties for the?
All my incoming null values, or all of the incoming control, at the time of operation, do not complain, normal may enter method, and that these two properties have what meaning,
  •  Tags:  
  • C#
  • Related