Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Runtime / CompilerServices / FixedBufferAttribute.cs / 1305376 / FixedBufferAttribute.cs
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** Class: FixedBufferAttribute
**
** Purpose: Used by a compiler for generating value types
** in-place within other value types containing a certain
** number of elements of the given (primitive) type. Somewhat
** similar to P/Invoke's ByValTStr attribute.
** Used by C# with this syntax: "fixed int buffer[10];"
**
===========================================================*/
using System;
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Field, Inherited=false)]
public sealed class FixedBufferAttribute : Attribute
{
private Type elementType;
private int length;
public FixedBufferAttribute(Type elementType, int length)
{
this.elementType = elementType;
this.length = length;
}
public Type ElementType {
get {
return elementType;
}
}
public int Length {
get {
return length;
}
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** Class: FixedBufferAttribute
**
** Purpose: Used by a compiler for generating value types
** in-place within other value types containing a certain
** number of elements of the given (primitive) type. Somewhat
** similar to P/Invoke's ByValTStr attribute.
** Used by C# with this syntax: "fixed int buffer[10];"
**
===========================================================*/
using System;
namespace System.Runtime.CompilerServices
{
[AttributeUsage(AttributeTargets.Field, Inherited=false)]
public sealed class FixedBufferAttribute : Attribute
{
private Type elementType;
private int length;
public FixedBufferAttribute(Type elementType, int length)
{
this.elementType = elementType;
this.length = length;
}
public Type ElementType {
get {
return elementType;
}
}
public int Length {
get {
return length;
}
}
}
}
// 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
- GenericIdentity.cs
- SignatureToken.cs
- FixedSOMFixedBlock.cs
- ControlPaint.cs
- MutexSecurity.cs
- SqlProviderServices.cs
- SystemIPv6InterfaceProperties.cs
- ExpressionBuilder.cs
- RemotingSurrogateSelector.cs
- CheckPair.cs
- HttpVersion.cs
- Vector3DKeyFrameCollection.cs
- AuthorizationPolicyTypeElementCollection.cs
- UnsettableComboBox.cs
- LinearKeyFrames.cs
- Typeface.cs
- ItemList.cs
- XmlCustomFormatter.cs
- InstanceDataCollection.cs
- ConfigurationElementCollection.cs
- Style.cs
- CodePageUtils.cs
- SchemaSetCompiler.cs
- XPathException.cs
- ContentPathSegment.cs
- NullRuntimeConfig.cs
- CodeSnippetCompileUnit.cs
- PeerInputChannel.cs
- EntityClientCacheKey.cs
- _IPv4Address.cs
- WebBrowser.cs
- CssClassPropertyAttribute.cs
- ScopelessEnumAttribute.cs
- ObsoleteAttribute.cs
- QuadraticBezierSegment.cs
- StructuralCache.cs
- CacheModeValueSerializer.cs
- RemoteWebConfigurationHost.cs
- UIPermission.cs
- QilIterator.cs
- UICuesEvent.cs
- Base64Decoder.cs
- NameTable.cs
- TimeSpanParse.cs
- XmlComplianceUtil.cs
- GAC.cs
- WizardStepBase.cs
- FixUp.cs
- ScopedKnownTypes.cs
- ScopelessEnumAttribute.cs
- ToolStripLabel.cs
- EditingCommands.cs
- HintTextConverter.cs
- HMACSHA384.cs
- DiscoveryInnerClientAdhoc11.cs
- EventEntry.cs
- GridViewRow.cs
- OutputCacheProfile.cs
- DataGridItemEventArgs.cs
- ConvertersCollection.cs
- ClientTargetCollection.cs
- TdsParser.cs
- DES.cs
- DataBoundControl.cs
- WindowsFormsSynchronizationContext.cs
- GridViewAutomationPeer.cs
- _OSSOCK.cs
- ProvidersHelper.cs
- ProxyAssemblyNotLoadedException.cs
- XamlTypeMapper.cs
- DisplayMemberTemplateSelector.cs
- TypeReference.cs
- LineBreak.cs
- TextView.cs
- SendMailErrorEventArgs.cs
- ToolStripSystemRenderer.cs
- CanonicalizationDriver.cs
- TextSearch.cs
- DataGridColumnReorderingEventArgs.cs
- DbConnectionInternal.cs
- AuthStoreRoleProvider.cs
- ConditionCollection.cs
- ToolStripDropDownItemDesigner.cs
- ObjectManager.cs
- TreeNodeCollection.cs
- Form.cs
- GestureRecognitionResult.cs
- AnonymousIdentificationModule.cs
- LineSegment.cs
- QueryContinueDragEvent.cs
- TimeoutHelper.cs
- Screen.cs
- DBDataPermission.cs
- CheckBoxField.cs
- InternalMappingException.cs
- Timer.cs
- ApplicationProxyInternal.cs
- AdPostCacheSubstitution.cs
- XamlSerializerUtil.cs
- RefreshPropertiesAttribute.cs