You can use Enumerable.Any() :
foreach (var items in RowModels) { if(items.GetType().GetProperties().Any(prop => prop.Name == "TRId") ) {
With this, you can also just check the property directly:
foreach (var items in RowModels) { if(items.GetType().GetProperty("TRId") != null) {
Also, if you are looking for elements in RowModels that implement a specific interface or have a specific class, you can simply write:
foreach (var items in RowModels.OfType<YourType>()) {
The OfType<T>() method will automatically filter only types that have the specified type. This has the advantage that you also typed variables strongly.
source share