Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Collections / Generic / IEnumerable.cs / 1305376 / IEnumerable.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Interface: IEnumerable ** **[....] ** ** ** Purpose: Interface for providing generic IEnumerators ** ** ===========================================================*/ namespace System.Collections.Generic { using System; using System.Collections; using System.Runtime.InteropServices; using System.Runtime.CompilerServices; using System.Diagnostics.Contracts; // Implement this interface if you need to support foreach semantics. // Note that T[] : IList, and we want to ensure that if you use // IList , we ensure a YourValueType[] can be used // without jitting. Hence the TypeDependencyAttribute on SZArrayHelper. // This is a special hack internally though - see VM\compile.cpp. // The same attribute is on IList and ICollection . [TypeDependencyAttribute("System.SZArrayHelper")] [ContractClass(typeof(IEnumerableContract<>))] #if FEATURE_CORECLR public interface IEnumerable : IEnumerable #if false { } #endif #else public interface IEnumerable : IEnumerable #endif { // Returns an IEnumerator for this enumerable Object. The enumerator provides // a simple way to access all the contents of a collection. /// new IEnumerator GetEnumerator(); } [ContractClassFor(typeof(IEnumerable<>))] internal class IEnumerableContract : System.Collections.IEnumerableContract, IEnumerable { [Pure] IEnumerator IEnumerable .GetEnumerator() { Contract.Ensures(Contract.Result >() != null); return default(IEnumerator ); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TrackingCondition.cs
- XmlSiteMapProvider.cs
- SiteMapDataSourceView.cs
- SqlAggregateChecker.cs
- ProviderConnectionPointCollection.cs
- AdvancedBindingPropertyDescriptor.cs
- MouseCaptureWithinProperty.cs
- DefaultSerializationProviderAttribute.cs
- HeaderedItemsControl.cs
- ListView.cs
- ErrorEventArgs.cs
- autovalidator.cs
- ToolboxDataAttribute.cs
- CallbackValidator.cs
- EnumDataContract.cs
- ToolStrip.cs
- EventMappingSettings.cs
- PolicyUnit.cs
- GeometryHitTestResult.cs
- SolidBrush.cs
- AsyncCompletedEventArgs.cs
- ServiceDocument.cs
- JavaScriptSerializer.cs
- RegexTypeEditor.cs
- XslTransform.cs
- configsystem.cs
- FormViewPageEventArgs.cs
- ThreadInterruptedException.cs
- UnderstoodHeaders.cs
- MSG.cs
- RightsManagementLicense.cs
- TransformPatternIdentifiers.cs
- PrimitiveXmlSerializers.cs
- InkCanvasFeedbackAdorner.cs
- GeneralTransform3DCollection.cs
- CultureInfo.cs
- Point3D.cs
- _OSSOCK.cs
- BaseTreeIterator.cs
- DesignerForm.cs
- DataRelationPropertyDescriptor.cs
- TypeTypeConverter.cs
- XmlProcessingInstruction.cs
- DesignerSerializationVisibilityAttribute.cs
- OrderedDictionary.cs
- Cursors.cs
- FontCollection.cs
- Freezable.cs
- HtmlSelect.cs
- XmlSchemaSequence.cs
- PackageRelationshipCollection.cs
- ComNativeDescriptor.cs
- Point.cs
- AdCreatedEventArgs.cs
- Documentation.cs
- PrimitiveCodeDomSerializer.cs
- XsdBuildProvider.cs
- InternalReceiveMessage.cs
- DesignerSerializationVisibilityAttribute.cs
- PersonalizationStateQuery.cs
- PageAsyncTaskManager.cs
- ButtonBaseDesigner.cs
- Number.cs
- CodeNamespace.cs
- WebBrowserNavigatingEventHandler.cs
- ImageField.cs
- WebPartConnectionsCloseVerb.cs
- sqlser.cs
- CharacterString.cs
- ReferencedAssembly.cs
- PermissionAttributes.cs
- WebPartManagerInternals.cs
- _CacheStreams.cs
- WSDualHttpBindingCollectionElement.cs
- ProfileSection.cs
- XmlSchemaSimpleContent.cs
- StreamWriter.cs
- BrowserDefinitionCollection.cs
- Vector3DAnimationBase.cs
- ForEachAction.cs
- XmlArrayItemAttribute.cs
- ListComponentEditorPage.cs
- InputLangChangeRequestEvent.cs
- DataBindingList.cs
- ContentTypeSettingDispatchMessageFormatter.cs
- TextEffect.cs
- DesignTimeResourceProviderFactoryAttribute.cs
- ImportContext.cs
- DataGridViewTopRowAccessibleObject.cs
- ContextMenu.cs
- DPAPIProtectedConfigurationProvider.cs
- GridViewSelectEventArgs.cs
- SecurityKeyIdentifier.cs
- DetailsViewPagerRow.cs
- TextDecorationCollection.cs
- TextSelectionProcessor.cs
- XmlKeywords.cs
- FormsAuthenticationConfiguration.cs
- LinkClickEvent.cs
- ListItemsCollectionEditor.cs