using System;
namespace System.Runtime.InteropServices
{
/// Encapsulates an array and an offset within the specified array.
// Token: 0x020002ED RID: 749
[ComVisible(true)]
[Serializable]
public struct ArrayWithOffset
{
/// Initializes a new instance of the structure.
/// A managed array.
/// The offset in bytes, of the element to be passed through platform invoke.
// Token: 0x060021B4 RID: 8628 RVA: 0x00078F04 File Offset: 0x00077104
public ArrayWithOffset(object array, int offset)
{
this.array = array;
this.offset = offset;
}
/// Indicates whether the specified object matches the current object.
/// true if the object matches this ; otherwise, false.
/// Object to compare with this instance.
// Token: 0x060021B5 RID: 8629 RVA: 0x00078F14 File Offset: 0x00077114
public override bool Equals(object obj)
{
if (obj == null)
{
return false;
}
if (!(obj is ArrayWithOffset))
{
return false;
}
ArrayWithOffset arrayWithOffset = (ArrayWithOffset)obj;
return arrayWithOffset.array == this.array && arrayWithOffset.offset == this.offset;
}
/// Indicates whether the specified object matches the current instance.
/// true if the specified object matches the current instance; otherwise, false.
/// An object to compare with this instance.
// Token: 0x060021B6 RID: 8630 RVA: 0x00078F64 File Offset: 0x00077164
public bool Equals(ArrayWithOffset obj)
{
return obj.array == this.array && obj.offset == this.offset;
}
/// Returns a hash code for this value type.
/// The hash code for this instance.
// Token: 0x060021B7 RID: 8631 RVA: 0x00078F98 File Offset: 0x00077198
public override int GetHashCode()
{
return this.offset;
}
/// Returns the managed array referenced by this .
/// The managed array this instance references.
// Token: 0x060021B8 RID: 8632 RVA: 0x00078FA0 File Offset: 0x000771A0
public object GetArray()
{
return this.array;
}
/// Returns the offset provided when this was constructed.
/// The offset for this instance.
// Token: 0x060021B9 RID: 8633 RVA: 0x00078FA8 File Offset: 0x000771A8
public int GetOffset()
{
return this.offset;
}
/// Determines whether two specified objects have the same value.
/// true if the value of is the same as the value of ; otherwise, false.
/// An object to compare with the parameter.
/// An object to compare with the parameter.
// Token: 0x060021BA RID: 8634 RVA: 0x00078FB0 File Offset: 0x000771B0
public static bool operator ==(ArrayWithOffset a, ArrayWithOffset b)
{
return a.Equals(b);
}
/// Determines whether two specified objects no not have the same value.
/// true if the value of is not the same as the value of ; otherwise, false.
/// An object to compare with the parameter.
/// An object to compare with the parameter.
// Token: 0x060021BB RID: 8635 RVA: 0x00078FBC File Offset: 0x000771BC
public static bool operator !=(ArrayWithOffset a, ArrayWithOffset b)
{
return !a.Equals(b);
}
// Token: 0x04000CB9 RID: 3257
private object array;
// Token: 0x04000CBA RID: 3258
private int offset;
}
}