PK }UL 01-IEnumerableImplementation/PK NUJTh ' 01-IEnumerableImplementation/App.config
PK NUJw87
= 01-IEnumerableImplementation/IEnumerableImplementation.csproj
Debug
AnyCPU
{1E152FEC-4EDC-4DC8-BA50-E3F7C7CBF674}
Exe
Properties
IEnumerableImplementation
IEnumerableImplementation
v4.5.2
512
true
AnyCPU
true
full
false
bin\Debug\
DEBUG;TRACE
prompt
4
AnyCPU
pdbonly
true
bin\Release\
TRACE
prompt
4
PK NUJ? : 01-IEnumerableImplementation/IEnumerableImplementation.sln
Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 14
VisualStudioVersion = 14.0.25420.1
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "IEnumerableImplementation", "IEnumerableImplementation.csproj", "{1E152FEC-4EDC-4DC8-BA50-E3F7C7CBF674}"
EndProject
Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU
Release|Any CPU = Release|Any CPU
EndGlobalSection
GlobalSection(ProjectConfigurationPlatforms) = postSolution
{1E152FEC-4EDC-4DC8-BA50-E3F7C7CBF674}.Debug|Any CPU.ActiveCfg = Debug|Any CPU
{1E152FEC-4EDC-4DC8-BA50-E3F7C7CBF674}.Debug|Any CPU.Build.0 = Debug|Any CPU
{1E152FEC-4EDC-4DC8-BA50-E3F7C7CBF674}.Release|Any CPU.ActiveCfg = Release|Any CPU
{1E152FEC-4EDC-4DC8-BA50-E3F7C7CBF674}.Release|Any CPU.Build.0 = Release|Any CPU
EndGlobalSection
GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE
EndGlobalSection
EndGlobal
PK IPUJsb ' 01-IEnumerableImplementation/Program.csusing System;
using System.Collections;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace IEnumerableImplementation {
class A : IEnumerable {
public IEnumerator GetEnumerator() {
return new AEnumerator();
}
IEnumerator IEnumerable.GetEnumerator() {
return this.GetEnumerator();
}
private class AEnumerator : IEnumerator {
public int Current { get; private set; }
object IEnumerator.Current {
get {
return this.Current;
}
}
public void Dispose() {
}
public bool MoveNext() {
if (Current <= 5) {
Current++;
Console.WriteLine("AEnumerator.MoveNext() -> true");
return true;
} else {
Console.WriteLine("AEnumerator.MoveNext() -> false");
return false;
}
}
public void Reset() {
Current = 0;
}
}
}
class Program {
static void Main(string[] args) {
var a = new A();
Console.WriteLine("before foreach");
foreach (var i in a) {
Console.WriteLine(i);
}
Console.WriteLine("after foreach");
}
}
}
PK }UL ( 01-IEnumerableImplementation/Properties/PK NUJ (?u 7 01-IEnumerableImplementation/Properties/AssemblyInfo.csusing System.Reflection;
using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
// General Information about an assembly is controlled through the following
// set of attributes. Change these attribute values to modify the information
// associated with an assembly.
[assembly: AssemblyTitle("IEnumerableImplementation")]
[assembly: AssemblyDescription("")]
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("")]
[assembly: AssemblyProduct("IEnumerableImplementation")]
[assembly: AssemblyCopyright("Copyright © 2017")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]
// Setting ComVisible to false makes the types in this assembly not visible
// to COM components. If you need to access a type in this assembly from
// COM, set the ComVisible attribute to true on that type.
[assembly: ComVisible(false)]
// The following GUID is for the ID of the typelib if this project is exposed to COM
[assembly: Guid("1e152fec-4edc-4dc8-ba50-e3f7c7cbf674")]
// Version information for an assembly consists of the following four values:
//
// Major Version
// Minor Version
// Build Number
// Revision
//
// You can specify all the values or you can default the Build and Revision Numbers
// by using the '*' as shown below:
// [assembly: AssemblyVersion("1.0.*")]
[assembly: AssemblyVersion("1.0.0.0")]
[assembly: AssemblyFileVersion("1.0.0.0")]
PK }UL 01-IEnumerableImplementation/PK NUJTh ' ; 01-IEnumerableImplementation/App.configPK NUJw87
= = 01-IEnumerableImplementation/IEnumerableImplementation.csprojPK NUJ? : . 01-IEnumerableImplementation/IEnumerableImplementation.slnPK IPUJsb ' ~ 01-IEnumerableImplementation/Program.csPK }UL ( L 01-IEnumerableImplementation/Properties/PK NUJ (?u 7 01-IEnumerableImplementation/Properties/AssemblyInfo.csPK