Skip to content

Commit

Permalink
Seal (private) enumerators
Browse files Browse the repository at this point in the history
  • Loading branch information
atifaziz committed Jan 12, 2023
1 parent a8e13e0 commit 52f705d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion MoreLinq/Permutations.cs
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ public static partial class MoreEnumerable
/// The private implementation class that produces permutations of a sequence.
/// </summary>

class PermutationEnumerator<T> : IEnumerator<IList<T>>
sealed class PermutationEnumerator<T> : IEnumerator<IList<T>>
{
// NOTE: The algorithm used to generate permutations uses the fact that any set
// can be put into 1-to-1 correspondence with the set of ordinals number (0..n).
Expand Down
2 changes: 1 addition & 1 deletion MoreLinq/Subsets.cs
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,7 @@ sealed class SubsetGenerator<T> : IEnumerable<IList<T>>
/// predetermined size less than or equal to the original set size.
/// </summary>

class SubsetEnumerator : IEnumerator<IList<T>>
sealed class SubsetEnumerator : IEnumerator<IList<T>>
{
readonly IList<T> _set; // the original set of elements
readonly T[] _subset; // the current subset to return
Expand Down

0 comments on commit 52f705d

Please sign in to comment.