Содержание
- 2. state = 2; return true; case 2: break; } return false; } string System.Collections.Generic.IEnumerator .Current {
- 3. void IDisposable.Dispose() { } } } 2) public class MusicTitles { string[] names = { "Tubular
- 4. public IEnumerable Reverse() { for (int i = 3; i >= 0; i--) { yield return
- 5. 3) var titles = new MusicTitles(); foreach (var title in titles) { Console.WriteLine(title); } Console.WriteLine(); Console.WriteLine("обратная");
- 6. 4) public class GameMoves { private IEnumerator cross; private IEnumerator circle; public GameMoves() { cross =
- 7. public IEnumerator Circle() { while (true) { Console.WriteLine("Нолик, ход {0}”, move); if(++move >= MaxMoves) yield break;
- 8. 6) Крестик, ход 0 Нолик, ход 1 Крестик, ход 2 Нолик, ход 3 Крестик, ход 4
- 9. 8) Var result = Divide(5,2); Console.WriteLine("результат деления: (0), остаток: {1}", result.Item1, result.Item2); 9) public class Tuple
- 10. public class Person: IEquatable { public int Id {get; private set; } public string FirstName {get;
- 11. public bool Equals(Person other) { if (other == null) throw new ArgumentNullException("other"); return this.Id==other.Id && this.FirstName==other.FirstName
- 12. Person[] persons2 = { new Person { FirstName = "Michael", LastName = "Jackson" }, janet };
- 13. 15) if (t1.Equals(t2)) Console.WriteLine("одинаковое содержимое"); 16) class TupleComparer: IEqualityComparer { public new bool Equals(object x, object
- 15. Скачать презентацию