object dataSource; // The object in question var prop = dataSource.GetType().GetProperty(boundField, BindingFlags.IgnoreCase | BindingFlags.Public | BindingFlags.Instance); if (prop != null) // The property existsI (think) the VB version would be something like this:
Dim prop = dataSource.GetType().GetProperty(boundField, BindingFlags.IgnoreCase Or BindingFlags.Public Or BindingFlags.Instance) If prop <> Nothing Then ' Property exists.You may need to adjust the binding flags, depending on the types of properties you want to check.