Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / XPath / Internal / ClonableStack.cs / 1305376 / ClonableStack.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
//-----------------------------------------------------------------------------
namespace MS.Internal.Xml.XPath {
using System;
using System.Xml;
using System.Xml.XPath;
using System.Diagnostics;
internal sealed class ClonableStack : System.Collections.Generic.List {
public ClonableStack() {}
public ClonableStack(int capacity) : base(capacity) {}
private ClonableStack(System.Collections.Generic.IEnumerable collection) : base(collection) { }
public void Push(T value) {
base.Add(value);
}
public T Pop() {
int last = base.Count - 1;
T result = base[last];
base.RemoveAt(last);
return result;
}
public T Peek() {
return base[base.Count - 1];
}
public ClonableStack Clone() { return new ClonableStack(this); }
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
//-----------------------------------------------------------------------------
namespace MS.Internal.Xml.XPath {
using System;
using System.Xml;
using System.Xml.XPath;
using System.Diagnostics;
internal sealed class ClonableStack : System.Collections.Generic.List {
public ClonableStack() {}
public ClonableStack(int capacity) : base(capacity) {}
private ClonableStack(System.Collections.Generic.IEnumerable collection) : base(collection) { }
public void Push(T value) {
base.Add(value);
}
public T Pop() {
int last = base.Count - 1;
T result = base[last];
base.RemoveAt(last);
return result;
}
public T Peek() {
return base[base.Count - 1];
}
public ClonableStack Clone() { return new ClonableStack(this); }
}
}
// 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
- Size3DConverter.cs
- DockPanel.cs
- LinqDataSource.cs
- WebConfigurationManager.cs
- HttpHandlerAction.cs
- SettingsPropertyNotFoundException.cs
- SessionPageStateSection.cs
- XmlNullResolver.cs
- GenericEnumerator.cs
- Rules.cs
- RequestTimeoutManager.cs
- PageHandlerFactory.cs
- DataListItem.cs
- RootProjectionNode.cs
- UIElementCollection.cs
- PropertyGroupDescription.cs
- CompareValidator.cs
- JoinTreeSlot.cs
- HttpListenerPrefixCollection.cs
- _ShellExpression.cs
- XmlSchemaElement.cs
- Validator.cs
- AtomMaterializer.cs
- VisualTarget.cs
- ImageBrush.cs
- XmlAttributeCache.cs
- GeneralTransform3D.cs
- TextTreeTextBlock.cs
- MostlySingletonList.cs
- ZipFileInfo.cs
- Compiler.cs
- ProbeMatchesCD1.cs
- Quaternion.cs
- SurrogateSelector.cs
- SafeHandles.cs
- Configuration.cs
- SQLBoolean.cs
- DataGridViewRow.cs
- OneOfTypeConst.cs
- CompressedStack.cs
- Button.cs
- WebPart.cs
- WmfPlaceableFileHeader.cs
- InplaceBitmapMetadataWriter.cs
- JpegBitmapDecoder.cs
- LinqDataSourceInsertEventArgs.cs
- ArrayTypeMismatchException.cs
- Triplet.cs
- SerialErrors.cs
- InputScopeAttribute.cs
- ExpressionBuilder.cs
- WebPartsSection.cs
- PrtTicket_Public.cs
- DeclarativeCatalogPartDesigner.cs
- ConnectionPoint.cs
- TextEditorThreadLocalStore.cs
- TypeToken.cs
- AnonymousIdentificationSection.cs
- BindableTemplateBuilder.cs
- Nodes.cs
- DateTimeConverter.cs
- IsolatedStorageSecurityState.cs
- RequiredFieldValidator.cs
- ExpandCollapseIsCheckedConverter.cs
- TaskForm.cs
- CompModSwitches.cs
- RegexGroup.cs
- DictionaryBase.cs
- WsdlBuildProvider.cs
- Certificate.cs
- DesignConnectionCollection.cs
- MethodToken.cs
- VirtualPathUtility.cs
- Authorization.cs
- TreeNodeBindingCollection.cs
- MemberProjectionIndex.cs
- PrefixQName.cs
- DataBoundControlHelper.cs
- WebHttpBinding.cs
- OrderPreservingSpoolingTask.cs
- GlyphTypeface.cs
- ScriptDescriptor.cs
- TypeConverterAttribute.cs
- ImageSource.cs
- MenuItem.cs
- AnimatedTypeHelpers.cs
- _KerberosClient.cs
- ButtonStandardAdapter.cs
- InsufficientMemoryException.cs
- EnumerableRowCollection.cs
- ComboBoxItem.cs
- DbProviderSpecificTypePropertyAttribute.cs
- Publisher.cs
- BaseCAMarshaler.cs
- SiteMap.cs
- IFlowDocumentViewer.cs
- ConstrainedDataObject.cs
- SoapIgnoreAttribute.cs
- ThreadPool.cs
- TrackingServices.cs