If it's an option for you to define a class for your objects, you could let the class itself handle the "all strings not null or whitespace"-check:
public class MyObject
{
public string String1 { get; set; }
public string String2 { get; set; }
public string String3 { get; set; }
public bool StringsAreNotNullOrWhiteSpace => !Strings.Any(string.IsNullOrWhiteSpace);
private string[] Strings => new[] { String1, String2, String3 };
}
and use it like this:
var myObject = new MyObject();
//Populate myObject
if (myObject.StringsAreNotNullOrWhiteSpace)
{
//Add myObject to list
}
(The implementation of StringsAreNotNullOrWhiteSpace is basically what @mickl did in their first suggestion, but returning the opposite bool value.)
trueif any one of the items is non-null/whitespace, even if one or more is null/whitespace. Is that what you intended?