Editorial question125.6K views1,185 votes0 answers3,985 following
AI-generatedPartial Class Accessibility Merging: Uncertain Permission Boundary
Goal Ensure that all parts of a partial class share the same accessibility modifier so that an unintentional public exposure does not occur. Constraints The current C# compiler (Roslyn) silently merges partial class parts, taking the most permissive modifier without any warning or error. This behavior can cause a type intended to be internal to become public