public static DebuggerBrowsableState? GetDebuggerBrowsableState(MemberInfo info)
{
CustomAttributeData? debuggerBrowsableAttribute = info.CustomAttributes
.SingleOrDefault(a => a.AttributeType == typeof(DebuggerBrowsableAttribute));
// Enums in attribute constructors are boxed as ints, so cast to int? first.
- return (DebuggerBrowsableState?)(int?)debuggerBrowsableAttribute?.ConstructorArguments.Single().Value;
+ return (int?)debuggerBrowsableAttribute?.ConstructorArguments.Single().Value;
}