Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR CSHARP

c# multiple strings are empty

string parameter1 = "a", parameter2 = "a", parameter3 = "a";

// using System.Linq;
if (new[] { parameter1, parameter2, parameter3 }.All(parameter => !string.IsNullOrEmpty(parameter)))
{
	// parameters have text
}
else
	// parameters were empty or null
 
PREVIOUS NEXT
Tagged: #multiple #strings #empty
ADD COMMENT
Topic
Name
8+7 =