Code:
/ 4.0 / 4.0 / untmp / 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. ///
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- XmlSchemaComplexContent.cs
- ExceptionHandlerDesigner.cs
- RegistryKey.cs
- ConditionalWeakTable.cs
- HitTestResult.cs
- SecureEnvironment.cs
- TextEditorContextMenu.cs
- Highlights.cs
- FormViewDeletedEventArgs.cs
- EnumConverter.cs
- EventManager.cs
- Calendar.cs
- XmlSchemaResource.cs
- WSHttpBindingElement.cs
- AttributeTableBuilder.cs
- GenericAuthenticationEventArgs.cs
- ReadOnlyAttribute.cs
- SettingsBase.cs
- XmlNamespaceManager.cs
- VsPropertyGrid.cs
- ExpressionList.cs
- AssemblyName.cs
- BitmapSizeOptions.cs
- MetaForeignKeyColumn.cs
- ScriptControlManager.cs
- NotCondition.cs
- TextOptionsInternal.cs
- precedingsibling.cs
- Persist.cs
- FontStretches.cs
- DataGridViewCellValidatingEventArgs.cs
- EnumUnknown.cs
- PixelFormat.cs
- BackgroundFormatInfo.cs
- XmlParserContext.cs
- IDispatchConstantAttribute.cs
- storepermissionattribute.cs
- SimpleTypeResolver.cs
- KeysConverter.cs
- GenericTypeParameterBuilder.cs
- PlainXmlDeserializer.cs
- GeometryCollection.cs
- FocusChangedEventArgs.cs
- XmlSchemaSimpleType.cs
- hresults.cs
- ClientEventManager.cs
- oledbmetadatacollectionnames.cs
- ValidatorAttribute.cs
- WebPartsPersonalizationAuthorization.cs
- HttpInputStream.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- ExpressionNormalizer.cs
- DataGridViewColumnCollection.cs
- Rfc2898DeriveBytes.cs
- BaseCAMarshaler.cs
- TimeoutValidationAttribute.cs
- AppDomainAttributes.cs
- StickyNoteHelper.cs
- PagesChangedEventArgs.cs
- ValueUtilsSmi.cs
- WebBrowserNavigatedEventHandler.cs
- HttpApplicationFactory.cs
- FactoryGenerator.cs
- MethodBuilder.cs
- TransformerConfigurationWizardBase.cs
- CfgParser.cs
- ArgIterator.cs
- AdornerHitTestResult.cs
- XmlUrlEditor.cs
- DynamicRenderer.cs
- Nodes.cs
- FileSystemInfo.cs
- CheckBoxAutomationPeer.cs
- CriticalHandle.cs
- TableAdapterManagerMethodGenerator.cs
- ProcessThreadCollection.cs
- WindowInteropHelper.cs
- PathData.cs
- DPCustomTypeDescriptor.cs
- CriticalHandle.cs
- UnsafeNetInfoNativeMethods.cs
- MulticastDelegate.cs
- PropertyPathWorker.cs
- UnsafeNativeMethodsTablet.cs
- CSharpCodeProvider.cs
- ToolboxBitmapAttribute.cs
- JpegBitmapDecoder.cs
- MessageQueuePermissionEntry.cs
- _NetRes.cs
- MappedMetaModel.cs
- MappingModelBuildProvider.cs
- VScrollBar.cs
- PropertyGridCommands.cs
- BindingSourceDesigner.cs
- SecurityRequiresReviewAttribute.cs
- FormatSettings.cs
- SoapTypeAttribute.cs
- DrawingServices.cs
- HttpCacheVaryByContentEncodings.cs
- BitmapEffectGeneralTransform.cs