How to check whether a type is string in C#? December 22, 2023 by Tarik if (property.PropertyType == typeof(string))