Using reflection I'd like to retrieve only the built-in data type properties from a C# object. Is there a better way to do that then using a bunch of ||
(ors) in a Where
method specifying the types I am interested in?
Type sourceType = typeof(TSource);
var props = sourceType.GetProperties()
.Where(pi => pi.PropertyType == typeof(int)
|| pi.PropertyType == typeof(string)); // .... etc.