Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / Data / System / Data / BaseCollection.cs / 1 / BaseCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data { using System; using System.Collections; using System.ComponentModel; using System.Globalization; ////// #if WINFSInternalOnly internal #else public #endif 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; ////// #if WINFSInternalOnly internal #else public #endif 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
- AnnotationHelper.cs
- DecimalConstantAttribute.cs
- TypeReference.cs
- DragEventArgs.cs
- PersistChildrenAttribute.cs
- SystemIcmpV6Statistics.cs
- ByteStreamMessage.cs
- EventLevel.cs
- SamlSerializer.cs
- BrowserCapabilitiesCompiler.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- Automation.cs
- Graph.cs
- HtmlButton.cs
- QueryOutputWriterV1.cs
- Pair.cs
- HostingPreferredMapPath.cs
- ProfilePropertyNameValidator.cs
- TextTreeFixupNode.cs
- ProfileService.cs
- StringExpressionSet.cs
- PartDesigner.cs
- PerfCounters.cs
- FixedSOMFixedBlock.cs
- UndoManager.cs
- ColorContextHelper.cs
- LineProperties.cs
- ListControlConvertEventArgs.cs
- WebPartDisplayMode.cs
- GeneralTransform3DGroup.cs
- SemanticResultKey.cs
- Int32KeyFrameCollection.cs
- HttpVersion.cs
- ToolStripLabel.cs
- COM2IPerPropertyBrowsingHandler.cs
- TCPClient.cs
- BitmapDecoder.cs
- QueryOutputWriter.cs
- BuildResultCache.cs
- LinqTreeNodeEvaluator.cs
- brushes.cs
- DetailsViewInsertEventArgs.cs
- InstanceStore.cs
- ExpressionNode.cs
- embossbitmapeffect.cs
- _SSPISessionCache.cs
- HebrewNumber.cs
- IDataContractSurrogate.cs
- DynamicActivityProperty.cs
- loginstatus.cs
- XmlWellformedWriter.cs
- RequestCacheEntry.cs
- RTLAwareMessageBox.cs
- DynamicValidatorEventArgs.cs
- QilSortKey.cs
- PageSetupDialog.cs
- CustomCategoryAttribute.cs
- BufferedReadStream.cs
- XsltCompileContext.cs
- DuplicateMessageDetector.cs
- LogManagementAsyncResult.cs
- DiscardableAttribute.cs
- ArrayItemReference.cs
- ToolZone.cs
- XomlCompilerError.cs
- XmlSchemaDocumentation.cs
- FormatStringEditor.cs
- SizeAnimation.cs
- WSSecurityPolicy12.cs
- CompositeDuplexElement.cs
- BinaryFormatterWriter.cs
- DbDataRecord.cs
- PrintPreviewControl.cs
- CompilationLock.cs
- BaseCodeDomTreeGenerator.cs
- RadioButtonFlatAdapter.cs
- TemplateKey.cs
- XmlMembersMapping.cs
- ComIntegrationManifestGenerator.cs
- MemoryStream.cs
- PropertyTab.cs
- DataSourceExpressionCollection.cs
- UIntPtr.cs
- SR.cs
- UmAlQuraCalendar.cs
- RegisteredHiddenField.cs
- Knowncolors.cs
- HyperLink.cs
- SqlConnectionStringBuilder.cs
- CroppedBitmap.cs
- ScriptRef.cs
- ResourceContainer.cs
- GridViewDeleteEventArgs.cs
- MDIControlStrip.cs
- Int32CollectionValueSerializer.cs
- XsdSchemaFileEditor.cs
- ADConnectionHelper.cs
- LightweightCodeGenerator.cs
- TransformGroup.cs
- StorageMappingFragment.cs