Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / clr / src / BCL / System / Runtime / InteropServices / ArrayWithOffset.cs / 1 / ArrayWithOffset.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== namespace System.Runtime.InteropServices { using System; using System.Runtime.CompilerServices; [Serializable] [System.Runtime.InteropServices.ComVisible(true)] public struct ArrayWithOffset { //private ArrayWithOffset() //{ // throw new Exception(); //} public ArrayWithOffset(Object array, int offset) { m_array = array; m_offset = offset; m_count = 0; m_count = CalculateCount(); } public Object GetArray() { return m_array; } public int GetOffset() { return m_offset; } public override int GetHashCode() { return m_count + m_offset; } public override bool Equals(Object obj) { if (obj is ArrayWithOffset) return Equals((ArrayWithOffset)obj); else return false; } public bool Equals(ArrayWithOffset obj) { return obj.m_array == m_array && obj.m_offset == m_offset && obj.m_count == m_count; } public static bool operator ==(ArrayWithOffset a, ArrayWithOffset b) { return a.Equals(b); } public static bool operator !=(ArrayWithOffset a, ArrayWithOffset b) { return !(a == b); } [MethodImplAttribute(MethodImplOptions.InternalCall)] private extern int CalculateCount(); private Object m_array; private int m_offset; private int m_count; } } // 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
- DataBoundControlAdapter.cs
- ValueTable.cs
- PerformanceCounter.cs
- CommentEmitter.cs
- WebPartConnectionCollection.cs
- PasswordTextNavigator.cs
- TypeDependencyAttribute.cs
- LocalizedNameDescriptionPair.cs
- Configuration.cs
- GrammarBuilderPhrase.cs
- ArraySubsetEnumerator.cs
- LinkButton.cs
- SystemFonts.cs
- ScrollChrome.cs
- namescope.cs
- XmlReader.cs
- ApplicationFileParser.cs
- CustomLineCap.cs
- Stopwatch.cs
- CSharpCodeProvider.cs
- adornercollection.cs
- TypeRestriction.cs
- SoapEnumAttribute.cs
- InputLanguageProfileNotifySink.cs
- Rectangle.cs
- ConfigurationSection.cs
- ApplicationSecurityInfo.cs
- FirstQueryOperator.cs
- COM2IDispatchConverter.cs
- ColumnPropertiesGroup.cs
- ExpressionEditorAttribute.cs
- WebPartMenuStyle.cs
- documentsequencetextview.cs
- HttpModule.cs
- MatchSingleFxEngineOpcode.cs
- DecoderNLS.cs
- DesignerTransactionCloseEvent.cs
- ZipIOZip64EndOfCentralDirectoryBlock.cs
- TemplateColumn.cs
- PermissionToken.cs
- SQLSingle.cs
- DirectoryObjectSecurity.cs
- XmlParserContext.cs
- DrawingImage.cs
- CellPartitioner.cs
- WebServiceHandlerFactory.cs
- DoubleIndependentAnimationStorage.cs
- securitymgrsite.cs
- FontStyleConverter.cs
- HostingEnvironmentException.cs
- LayoutUtils.cs
- BitmapEffectInput.cs
- TemplateBamlRecordReader.cs
- ActivityStateQuery.cs
- CapabilitiesSection.cs
- ServiceNameElement.cs
- FileInfo.cs
- RestHandler.cs
- ChangeToolStripParentVerb.cs
- Debugger.cs
- BigInt.cs
- SettingsPropertyCollection.cs
- ParagraphResult.cs
- TextBoxLine.cs
- HttpFileCollection.cs
- TypeConverter.cs
- SchemaElement.cs
- MessagePropertyAttribute.cs
- BmpBitmapDecoder.cs
- UserControlBuildProvider.cs
- DataGridHeaderBorder.cs
- MonthCalendar.cs
- BinaryEditor.cs
- TextTreeUndoUnit.cs
- BitmapCodecInfo.cs
- StreamGeometry.cs
- MenuItemStyle.cs
- ToolStripRendererSwitcher.cs
- NumberFormatInfo.cs
- Baml6Assembly.cs
- AttributeInfo.cs
- SwitchAttribute.cs
- RegexCaptureCollection.cs
- HotCommands.cs
- BadImageFormatException.cs
- HTMLTextWriter.cs
- MarginsConverter.cs
- Evaluator.cs
- userdatakeys.cs
- DataGridViewComboBoxCell.cs
- DesignerSerializerAttribute.cs
- SynchronousChannel.cs
- SourceFileBuildProvider.cs
- Triplet.cs
- RequiredFieldValidator.cs
- XmlDocumentSerializer.cs
- HttpHandlerActionCollection.cs
- CodeTypeMemberCollection.cs
- VisualTreeHelper.cs
- RegisteredExpandoAttribute.cs