Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Core / Microsoft / Scripting / Utils / StrongBox.cs / 1305376 / StrongBox.cs
/* **************************************************************************** * * Copyright (c) Microsoft Corporation. * * This source code is subject to terms and conditions of the Microsoft Public License. A * copy of the license can be found in the License.html file at the root of this distribution. If * you cannot locate the Microsoft Public License, please send an email to * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound * by the terms of the Microsoft Public License. * * You must not remove this notice, or any other, from this software. * * * ***************************************************************************/ namespace System.Runtime.CompilerServices { ////// Holds a reference to a value. /// ///The type of the value that the public class StrongBoxreferences. : IStrongBox { /// /// Gets the strongly typed value associated with the [System.Diagnostics.CodeAnalysis.SuppressMessage("Microsoft.Design", "CA1051:DoNotDeclareVisibleInstanceFields")] public T Value; ////// This is explicitly exposed as a field instead of a property to enable loading the address of the field. ////// Initializes a new StrongBox which can receive a value when used in a reference call. /// public StrongBox() { } ////// Initializes a new /// A value that thewith the specified value. /// will reference. public StrongBox(T value) { Value = value; } object IStrongBox.Value { get { return Value; } set { Value = (T)value; } } } /// /// Defines a property for accessing the value that an object references. /// public interface IStrongBox { ////// Gets or sets the value the object references. /// object Value { get; set; } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RIPEMD160.cs
- TraceHandler.cs
- SchemaEntity.cs
- DesignerView.cs
- cookiecontainer.cs
- CompilationSection.cs
- EntityTypeBase.cs
- ResourceWriter.cs
- RealProxy.cs
- AttachmentService.cs
- RuntimeHandles.cs
- ActivityWithResultConverter.cs
- PlainXmlWriter.cs
- PageTheme.cs
- ConnectionConsumerAttribute.cs
- DataControlField.cs
- TextElementEnumerator.cs
- AssemblyBuilderData.cs
- SmiMetaData.cs
- DataBoundLiteralControl.cs
- ImageInfo.cs
- TypeConverterHelper.cs
- Button.cs
- AssemblyAttributes.cs
- AttributeProviderAttribute.cs
- SqlConnectionManager.cs
- AutomationElement.cs
- DataBinding.cs
- ImpersonationContext.cs
- PartialTrustValidationBehavior.cs
- TransactedReceiveData.cs
- DesignTimeVisibleAttribute.cs
- Int64AnimationUsingKeyFrames.cs
- PageThemeBuildProvider.cs
- GeneralTransform3D.cs
- TransactionChannel.cs
- MessageQueueConverter.cs
- ConfigPathUtility.cs
- WinEventQueueItem.cs
- FontSizeConverter.cs
- MimeBasePart.cs
- TaiwanCalendar.cs
- SystemException.cs
- PasswordTextContainer.cs
- WsdlBuildProvider.cs
- BaseDataListDesigner.cs
- XmlSerializerVersionAttribute.cs
- NameValuePair.cs
- ToolStripRendererSwitcher.cs
- EventRoute.cs
- PropertyDescriptorCollection.cs
- ApplicationFileCodeDomTreeGenerator.cs
- SymmetricAlgorithm.cs
- COM2ICategorizePropertiesHandler.cs
- SoapExtensionTypeElement.cs
- WebConfigurationManager.cs
- RewritingValidator.cs
- WebPartCollection.cs
- StylusPointPropertyUnit.cs
- ViewCellRelation.cs
- DataGridColumnDropSeparator.cs
- AppLevelCompilationSectionCache.cs
- RuntimeHandles.cs
- SelectionEditor.cs
- TableLayoutSettingsTypeConverter.cs
- TextViewDesigner.cs
- InstanceKey.cs
- TextEncodedRawTextWriter.cs
- DefaultBinder.cs
- QilBinary.cs
- ConfigurationConverterBase.cs
- CodeTypeOfExpression.cs
- RowType.cs
- Pointer.cs
- FileVersion.cs
- ProtocolsConfigurationHandler.cs
- SessionIDManager.cs
- TdsValueSetter.cs
- ConfigurationConverterBase.cs
- VirtualPath.cs
- WinEventQueueItem.cs
- SelectionHighlightInfo.cs
- TransactionFlowBindingElementImporter.cs
- DataGridViewCellLinkedList.cs
- DocumentCollection.cs
- LinearGradientBrush.cs
- BindingGroup.cs
- WebInvokeAttribute.cs
- SignatureConfirmations.cs
- BuilderPropertyEntry.cs
- XslAst.cs
- DBConcurrencyException.cs
- ChangeNode.cs
- oledbconnectionstring.cs
- ZoneButton.cs
- UserNamePasswordValidator.cs
- NamespaceInfo.cs
- DESCryptoServiceProvider.cs
- InkCanvasFeedbackAdorner.cs
- PackageDigitalSignature.cs