Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Net / System / Net / Mail / AlternateViewCollection.cs / 1 / AlternateViewCollection.cs
using System; using System.Collections.ObjectModel; namespace System.Net.Mail { public sealed class AlternateViewCollection : Collection, IDisposable { bool disposed = false; internal AlternateViewCollection() { } public void Dispose() { if (disposed) { return; } foreach (AlternateView view in this) { view.Dispose(); } Clear(); disposed = true; } protected override void RemoveItem(int index){ if (disposed) { throw new ObjectDisposedException(this.GetType().FullName); } base.RemoveItem(index); } protected override void ClearItems(){ if (disposed) { throw new ObjectDisposedException(this.GetType().FullName); } base.ClearItems(); } protected override void SetItem(int index, AlternateView item){ if (disposed) { throw new ObjectDisposedException(this.GetType().FullName); } if(item==null) { throw new ArgumentNullException("item"); } base.SetItem(index,item); } protected override void InsertItem(int index, AlternateView item){ if (disposed) { throw new ObjectDisposedException(this.GetType().FullName); } if(item==null){ throw new ArgumentNullException("item"); } base.InsertItem(index,item); } } }
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- MessageProperties.cs
- SqlColumnizer.cs
- ProgressiveCrcCalculatingStream.cs
- ListControlStringCollectionEditor.cs
- lengthconverter.cs
- ChangeInterceptorAttribute.cs
- WebPartChrome.cs
- CheckoutException.cs
- HuffCodec.cs
- _ListenerRequestStream.cs
- FormViewPagerRow.cs
- Validator.cs
- EntityDataSourceSelectingEventArgs.cs
- Int16Storage.cs
- XmlUrlEditor.cs
- Win32Exception.cs
- ConstrainedDataObject.cs
- PrePostDescendentsWalker.cs
- Debug.cs
- ImageListDesigner.cs
- TreeViewImageKeyConverter.cs
- CollectionConverter.cs
- WorkflowInstanceExtensionProvider.cs
- PolygonHotSpot.cs
- BasicHttpMessageCredentialType.cs
- IChannel.cs
- ExpressionContext.cs
- CharKeyFrameCollection.cs
- ExpressionParser.cs
- SoundPlayerAction.cs
- TextBox.cs
- ElementAction.cs
- Decoder.cs
- EventPropertyMap.cs
- RuntimeConfigLKG.cs
- CodePageUtils.cs
- CacheMode.cs
- NativeDirectoryServicesQueryAPIs.cs
- NodeFunctions.cs
- DataGridViewTopLeftHeaderCell.cs
- Int32CollectionConverter.cs
- WebPartTransformerCollection.cs
- GeneralTransform3DGroup.cs
- ZipFileInfoCollection.cs
- SqlRemoveConstantOrderBy.cs
- DataGridViewComboBoxColumn.cs
- OLEDB_Enum.cs
- EditorZoneBase.cs
- AsymmetricAlgorithm.cs
- RotationValidation.cs
- ExpressionNode.cs
- PropertyHelper.cs
- DefaultPrintController.cs
- SortedDictionary.cs
- hwndwrapper.cs
- SimpleHandlerBuildProvider.cs
- CategoryGridEntry.cs
- WindowVisualStateTracker.cs
- DbMetaDataColumnNames.cs
- GlobalizationSection.cs
- XPathSingletonIterator.cs
- ToolStripArrowRenderEventArgs.cs
- AdornerDecorator.cs
- TextTreePropertyUndoUnit.cs
- FrameworkElementFactoryMarkupObject.cs
- DateTime.cs
- WmlSelectionListAdapter.cs
- _NegoState.cs
- LicenseContext.cs
- WindowsPen.cs
- ListenerElementsCollection.cs
- BinaryWriter.cs
- FactoryMaker.cs
- EntityFrameworkVersions.cs
- WinFormsComponentEditor.cs
- XmlAttributes.cs
- CompilationSection.cs
- Calendar.cs
- Converter.cs
- Error.cs
- SoapIgnoreAttribute.cs
- PageEventArgs.cs
- WebException.cs
- SecurityListenerSettingsLifetimeManager.cs
- SettingsSection.cs
- QueueProcessor.cs
- DirectionalLight.cs
- HttpPostedFileBase.cs
- NamespaceInfo.cs
- InvalidPrinterException.cs
- CompilerGlobalScopeAttribute.cs
- FixedSOMTable.cs
- MemberProjectionIndex.cs
- SmiEventSink_DeferedProcessing.cs
- TypeBuilder.cs
- MessageEventSubscriptionService.cs
- DecodeHelper.cs
- ColorAnimationUsingKeyFrames.cs
- TypeEnumerableViewSchema.cs
- PasswordTextNavigator.cs