using System.Collections.Generic; namespace VCommon.Collections { public class ReadOnlyHashSet { private readonly HashSet _underlying; public ReadOnlyHashSet(HashSet underlying) => _underlying = underlying; public bool Contains(T value) => _underlying.Contains(value); public static implicit operator ReadOnlyHashSet(HashSet instance) => new ReadOnlyHashSet(instance); } }