Reflection (?) - Check for null or empty for each property/field in a class?

Viewed 30309

I have a simple class as such:

public class FilterParams
{
    public string MeetingId { get; set; }
    public int? ClientId { get; set; }
    public string CustNum { get; set; }
    public int AttendedAsFavor { get; set; }
    public int Rating { get; set; }
    public string Comments { get; set; }
    public int Delete { get; set; }
}

How do I check for each of the property in the class, if they are not null (int) or empty/null (for string), then I'll convert and add that property's value to a List<string>?

Thanks.

6 Answers
Related