Skip to content

Commit

Permalink
Remove EnumGetValues
Browse files Browse the repository at this point in the history
  • Loading branch information
Charles Roddie committed Dec 30, 2023
1 parent cf8fe8c commit cc29eff
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions CSharpMath.Editor/SubIndexTypeMismatchException.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@ public class SubIndexTypeMismatchException : InvalidOperationException {
public SubIndexTypeMismatchException(Type atomType, MathListIndex index) : base(
$"{atomType} not found at index {index.AtomIndex}.") { }
public SubIndexTypeMismatchException(MathListIndex index) : base(
Array.IndexOf(typeof(MathListSubIndexType).GetEnumValues(), index.SubIndexType) == -1
? $"{index.SubIndexType} is an invalid subindex type."
: $"{index.SubIndexType} not found at index {index.AtomIndex}.") { }
$"{index.SubIndexType} not found at index {index.AtomIndex}.") { }
}
}

0 comments on commit cc29eff

Please sign in to comment.