[Mono-dev] Mono.Cecil.MethodDefinition.Is* properties
Sanghyeon Seo
sanxiyn at gmail.com
Mon Oct 1 00:52:13 EDT 2007
Hi,
Mono.Cecil.MethodDefinition.Is* properties are settable, and are implemented as:
public bool IsPublic {
get { return (m_attributes &
MethodAttributes.MemberAccessMask) == MethodAttributes.Public; }
set {
MethodAttributes masked =
(MethodAttributes.MemberAccessMask & MethodAttributes.Public);
if (value)
m_attributes |= masked;
else
m_attributes &= masked;
}
}
Shouldn't &= be ^= instead? The current implementation doesn't return
True for m.IsPublic even after m.IsPublic = true is executed.
--
Seo Sanghyeon
More information about the Mono-devel-list
mailing list