C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,818 questions
This browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
hello i have a little problem with my project.
My project gets from the user an array with 5 places these are also parameters for a key that I generate. now I want to check before the key is generated if the user has also set all 5 parameters (array entries) and if not it should come in error. how can I do this? sorry for my bad english
For example, in case of strings, you can use Any:
string[] parameters = new string[5];
// . . .
if( parameters.Any(string.IsNullOrWhiteSpace))
{
// ERROR; some values are not provided
. . . .
}
Show details if your parameters are different.