Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Data / System / Data / BaseCollection.cs / 1305376 / BaseCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data { using System; using System.Collections; using System.ComponentModel; using System.Globalization; ////// public class InternalDataCollectionBase : ICollection { internal static CollectionChangeEventArgs RefreshEventArgs = new CollectionChangeEventArgs(CollectionChangeAction.Refresh, null); //================================================== // the ICollection methods //================================================== ///Provides the base functionality for creating collections. ////// [ Browsable(false) ] public virtual int Count { get { return List.Count; } } public virtual void CopyTo(Array ar, int index) { List.CopyTo(ar, index); } public virtual IEnumerator GetEnumerator() { return List.GetEnumerator(); } [ Browsable(false) ] public bool IsReadOnly { get { return false; } } [Browsable(false)] public bool IsSynchronized { get { // so the user will know that it has to lock this object return false; } } // Return value: // > 0 (1) : CaseSensitve equal // < 0 (-1) : Case-Insensitive Equal // = 0 : Not Equal internal int NamesEqual(string s1, string s2, bool fCaseSensitive, CultureInfo locale) { if (fCaseSensitive) { if (String.Compare(s1, s2, false, locale) == 0) return 1; else return 0; } // Case, kana and width -Insensitive compare if (locale.CompareInfo.Compare(s1, s2, CompareOptions.IgnoreCase | CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth) == 0) { if (String.Compare(s1, s2, false, locale) == 0) return 1; else return -1; } return 0; } [Browsable(false)] public object SyncRoot { get { return this; } } protected virtual ArrayList List { get { return null; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //Gets the total number of elements in a collection. ///// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data { using System; using System.Collections; using System.ComponentModel; using System.Globalization; ////// public class InternalDataCollectionBase : ICollection { internal static CollectionChangeEventArgs RefreshEventArgs = new CollectionChangeEventArgs(CollectionChangeAction.Refresh, null); //================================================== // the ICollection methods //================================================== ///Provides the base functionality for creating collections. ////// [ Browsable(false) ] public virtual int Count { get { return List.Count; } } public virtual void CopyTo(Array ar, int index) { List.CopyTo(ar, index); } public virtual IEnumerator GetEnumerator() { return List.GetEnumerator(); } [ Browsable(false) ] public bool IsReadOnly { get { return false; } } [Browsable(false)] public bool IsSynchronized { get { // so the user will know that it has to lock this object return false; } } // Return value: // > 0 (1) : CaseSensitve equal // < 0 (-1) : Case-Insensitive Equal // = 0 : Not Equal internal int NamesEqual(string s1, string s2, bool fCaseSensitive, CultureInfo locale) { if (fCaseSensitive) { if (String.Compare(s1, s2, false, locale) == 0) return 1; else return 0; } // Case, kana and width -Insensitive compare if (locale.CompareInfo.Compare(s1, s2, CompareOptions.IgnoreCase | CompareOptions.IgnoreKanaType | CompareOptions.IgnoreWidth) == 0) { if (String.Compare(s1, s2, false, locale) == 0) return 1; else return -1; } return 0; } [Browsable(false)] public object SyncRoot { get { return this; } } protected virtual ArrayList List { get { return null; } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.Gets the total number of elements in a collection. ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- LocatorPartList.cs
- RadioButton.cs
- ResourceProviderFactory.cs
- TemplateGroupCollection.cs
- LabelLiteral.cs
- ContourSegment.cs
- CommonObjectSecurity.cs
- NullRuntimeConfig.cs
- StringAttributeCollection.cs
- FlagsAttribute.cs
- Latin1Encoding.cs
- ScalarConstant.cs
- SyntaxCheck.cs
- XmlExtensionFunction.cs
- OdbcDataReader.cs
- UIntPtr.cs
- XPathNode.cs
- DataContractSet.cs
- CompilerInfo.cs
- ConnectionProviderAttribute.cs
- HttpCookieCollection.cs
- XmlILTrace.cs
- InlinedLocationReference.cs
- ScrollItemPattern.cs
- PathGeometry.cs
- BamlCollectionHolder.cs
- WebConfigurationFileMap.cs
- ErrorWrapper.cs
- ParameterCollection.cs
- FixedSOMTableCell.cs
- DataGridViewRowEventArgs.cs
- TextRangeEditLists.cs
- MimeBasePart.cs
- TypedTableBase.cs
- ViewPort3D.cs
- PopupRootAutomationPeer.cs
- Triangle.cs
- LocatorGroup.cs
- SelectionProcessor.cs
- TypeUtil.cs
- SizeFConverter.cs
- WebHeaderCollection.cs
- PolicyManager.cs
- Rfc2898DeriveBytes.cs
- DeclarationUpdate.cs
- Transform3DGroup.cs
- NativeCppClassAttribute.cs
- StringComparer.cs
- MultipartIdentifier.cs
- ApplicationSecurityManager.cs
- PeerNearMe.cs
- ResourcePool.cs
- EndpointFilterProvider.cs
- TextTreeText.cs
- Geometry.cs
- StorageMappingItemLoader.cs
- ResourceDescriptionAttribute.cs
- TableAutomationPeer.cs
- Literal.cs
- PointHitTestResult.cs
- CatalogZoneBase.cs
- FixedDocumentSequencePaginator.cs
- StorageAssociationTypeMapping.cs
- ActivityXRefConverter.cs
- WebPartZoneCollection.cs
- RepeaterItem.cs
- MobileUITypeEditor.cs
- CollectionExtensions.cs
- RemotingConfigParser.cs
- UnconditionalPolicy.cs
- Dispatcher.cs
- SqlMethodTransformer.cs
- ZipFileInfo.cs
- InkCanvasSelection.cs
- RawStylusSystemGestureInputReport.cs
- HttpProxyCredentialType.cs
- CornerRadius.cs
- MetabaseServerConfig.cs
- SafeCoTaskMem.cs
- RenamedEventArgs.cs
- RetrieveVirtualItemEventArgs.cs
- DBParameter.cs
- StylusPointProperty.cs
- SafeSecurityHandles.cs
- WinFormsUtils.cs
- ToolStripPanelRow.cs
- BackEase.cs
- keycontainerpermission.cs
- XmlChoiceIdentifierAttribute.cs
- BamlResourceContent.cs
- HMACSHA256.cs
- DbRetry.cs
- RegexGroup.cs
- CodeMethodInvokeExpression.cs
- OdbcReferenceCollection.cs
- MorphHelpers.cs
- MissingMethodException.cs
- UserNamePasswordClientCredential.cs
- ZipIOModeEnforcingStream.cs
- AppDomain.cs