Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# void with nullable List argument

public void Process(string param1, List<string> param2 = null) 
{
    param2 = param2 ?? new List<string>();

    // or starting with C# 8
    param2 ??= new List<string>();
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #void #nullable #List #argument
ADD COMMENT
Topic
Name
5+4 =