Examples of errors detected by the V3202 diagnostic
V3202. Unreachable code detected. The 'case' value is out of the range of the match expression.
.NET 9
V3202 Unreachable code detected. The 'case' value is out of range of the match expression. VBCodeGenerator.cs 580
public enum MemberAttributes
{
Abstract = 0x0001,
Final = 0x0002,
Static = 0x0003,
Override = 0x0004,
Const = 0x0005,
New = 0x0010,
Overloaded = 0x0100,
Assembly = 0x1000,
FamilyAndAssembly = 0x2000,
Family = 0x3000,
FamilyOrAssembly = 0x4000,
Private = 0x5000,
Public = 0x6000,
AccessMask = 0xF000,
ScopeMask = 0x000F,
VTableMask = 0x00F0
}
protected override void OutputMemberScopeModifier(MemberAttributes attributes)
{
switch (attributes & MemberAttributes.ScopeMask)
{
case MemberAttributes.Abstract:
Output.Write("MustOverride ");
break;
case MemberAttributes.Final:
Output.Write("");
break;
....
case MemberAttributes.Private: // <=
Output.Write("Private ");
break;
....
}
}