Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- public class DynamicInputCollection : IEnumerable<int>, IEnumerable<double>
- {
- private readonly List<int> intList = new List<int>();
- private readonly List<double> doubleList = new List<double>();
- IEnumerator<double> IEnumerable<double>.GetEnumerator()
- {
- return doubleList.GetEnumerator();
- }
- IEnumerator<int> IEnumerable<int>.GetEnumerator()
- {
- return intList.GetEnumerator();
- }
- public IEnumerator GetEnumerator()
- {
- // How do we deal with this common case, where in context it means two different things?
- throw new System.NotImplementedException();
- }
- }
Add Comment
Please, Sign In to add comment