Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / EmptyControlCollection.cs / 1305376 / EmptyControlCollection.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI {
using System;
using System.Collections;
using System.Security.Permissions;
///
///
/// Represents a ControlCollection that is always empty.
///
///
public class EmptyControlCollection : ControlCollection {
///
/// [To be supplied.]
///
public EmptyControlCollection(Control owner) : base(owner) {
}
private void ThrowNotSupportedException() {
throw new HttpException(SR.GetString(SR.Control_does_not_allow_children,
Owner.GetType().ToString()));
}
///
/// [To be supplied.]
///
public override void Add(Control child) {
ThrowNotSupportedException();
}
///
/// [To be supplied.]
///
public override void AddAt(int index, Control child) {
ThrowNotSupportedException();
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI {
using System;
using System.Collections;
using System.Security.Permissions;
///
///
/// Represents a ControlCollection that is always empty.
///
///
public class EmptyControlCollection : ControlCollection {
///
/// [To be supplied.]
///
public EmptyControlCollection(Control owner) : base(owner) {
}
private void ThrowNotSupportedException() {
throw new HttpException(SR.GetString(SR.Control_does_not_allow_children,
Owner.GetType().ToString()));
}
///
/// [To be supplied.]
///
public override void Add(Control child) {
ThrowNotSupportedException();
}
///
/// [To be supplied.]
///
public override void AddAt(int index, Control child) {
ThrowNotSupportedException();
}
}
}
// 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
- CommunicationException.cs
- OdbcException.cs
- HtmlEmptyTagControlBuilder.cs
- InputManager.cs
- ThemeableAttribute.cs
- DataTableNewRowEvent.cs
- MobileListItem.cs
- NavigationWindowAutomationPeer.cs
- HitTestResult.cs
- CustomTypeDescriptor.cs
- controlskin.cs
- XPathDocument.cs
- MetadataCache.cs
- ComponentFactoryHelpers.cs
- LoadedOrUnloadedOperation.cs
- DataSourceControl.cs
- GiveFeedbackEvent.cs
- ResizeGrip.cs
- OdbcParameterCollection.cs
- BuildProviderCollection.cs
- BamlBinaryReader.cs
- ModelVisual3D.cs
- ElapsedEventArgs.cs
- RoutedEventConverter.cs
- _SpnDictionary.cs
- EventTask.cs
- QilParameter.cs
- RadioButtonRenderer.cs
- IdnMapping.cs
- BulletedList.cs
- BuildProviderUtils.cs
- SwitchLevelAttribute.cs
- TextContainerChangedEventArgs.cs
- DocumentPage.cs
- FeatureAttribute.cs
- ListView.cs
- HttpCachePolicyWrapper.cs
- ProfilePropertySettingsCollection.cs
- ComponentDispatcherThread.cs
- RegexCapture.cs
- FSWPathEditor.cs
- counter.cs
- SchemaImporterExtension.cs
- DbProviderFactories.cs
- ServiceModelActivity.cs
- PersonalizationStateInfoCollection.cs
- TextTrailingCharacterEllipsis.cs
- GradientSpreadMethodValidation.cs
- UpdateTracker.cs
- FormsIdentity.cs
- RestHandler.cs
- WebPartZoneAutoFormat.cs
- UIElement3D.cs
- CachedCompositeFamily.cs
- NetCodeGroup.cs
- CompModSwitches.cs
- DataGridRow.cs
- ArrayConverter.cs
- RenderDataDrawingContext.cs
- AttachedAnnotationChangedEventArgs.cs
- CardSpaceShim.cs
- QilLiteral.cs
- DataGrid.cs
- SecUtil.cs
- IProvider.cs
- UserUseLicenseDictionaryLoader.cs
- NewArrayExpression.cs
- MultiAsyncResult.cs
- NamedPipeChannelListener.cs
- SamlAction.cs
- TextChange.cs
- DataServiceExpressionVisitor.cs
- MemoryStream.cs
- HtmlTableCellCollection.cs
- SystemFonts.cs
- ToolboxItemImageConverter.cs
- NumberFormatInfo.cs
- ResolveCriteriaApril2005.cs
- CompositionTarget.cs
- DatagridviewDisplayedBandsData.cs
- SettingsPropertyNotFoundException.cs
- CurrentTimeZone.cs
- DnsEndpointIdentity.cs
- BamlVersionHeader.cs
- TransformConverter.cs
- ObjectStateEntryDbDataRecord.cs
- InstancePersistence.cs
- UIElement.cs
- DataBindingCollection.cs
- QEncodedStream.cs
- TableCell.cs
- CodeGenerator.cs
- XPathPatternBuilder.cs
- FormClosedEvent.cs
- TextEditorTables.cs
- DataGridViewCellStyleChangedEventArgs.cs
- SamlAssertionDirectKeyIdentifierClause.cs
- ReliableOutputConnection.cs
- XamlSerializer.cs
- MULTI_QI.cs