- Timestamp:
- 01/02/12 11:40:31 (12 years ago)
- Location:
- branches/RegressionBenchmarks
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/RegressionBenchmarks
-
branches/RegressionBenchmarks/HeuristicLab.Common/3.3/ObjectExtensions.cs
r6891 r7255 26 26 using System.Linq; 27 27 using System.Reflection; 28 using System.Security; 28 29 using System.Threading; 29 30 … … 95 96 foreach (FieldInfo f in type.GetAllFields()) { 96 97 if (excludeStaticMembers && f.IsStatic) continue; 97 yield return f.GetValue(obj); 98 object fieldValue; 99 try { 100 fieldValue = f.GetValue(obj); 101 } catch (SecurityException) { 102 continue; 103 } 104 yield return fieldValue; 98 105 } 99 106 }
Note: See TracChangeset
for help on using the changeset viewer.