Files
Dec2017-Script-Dump/mscorlib/System/Object.cs
T
2026-06-04 11:42:34 +02:00

113 lines
4.8 KiB
C#

using System;
using System.Runtime.CompilerServices;
using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
namespace System
{
/// <summary>Supports all classes in the .NET Framework class hierarchy and provides low-level services to derived classes. This is the ultimate base class of all classes in the .NET Framework; it is the root of the type hierarchy.</summary>
/// <filterpriority>1</filterpriority>
// Token: 0x02000002 RID: 2
[ComVisible(true)]
[ClassInterface(ClassInterfaceType.AutoDual)]
[Serializable]
public class Object
{
/// <summary>Initializes a new instance of the <see cref="T:System.Object" /> class.</summary>
// Token: 0x06000001 RID: 1 RVA: 0x000020EC File Offset: 0x000002EC
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.MayFail)]
public Object()
{
}
/// <summary>Determines whether the specified <see cref="T:System.Object" /> is equal to the current <see cref="T:System.Object" />.</summary>
/// <returns>true if the specified <see cref="T:System.Object" /> is equal to the current <see cref="T:System.Object" />; otherwise, false.</returns>
/// <param name="obj">The <see cref="T:System.Object" /> to compare with the current <see cref="T:System.Object" />. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x06000002 RID: 2 RVA: 0x000020F0 File Offset: 0x000002F0
public virtual bool Equals(object obj)
{
return this == obj;
}
/// <summary>Determines whether the specified <see cref="T:System.Object" /> instances are considered equal.</summary>
/// <returns>true if the instances are equal; otherwise false.</returns>
/// <param name="objA">The first <see cref="T:System.Object" /> to compare. </param>
/// <param name="objB">The second <see cref="T:System.Object" /> to compare. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x06000003 RID: 3 RVA: 0x000020F8 File Offset: 0x000002F8
public static bool Equals(object objA, object objB)
{
return objA == objB || (objA != null && objB != null && objA.Equals(objB));
}
/// <summary>Allows an object to try to free resources and perform other cleanup operations before it is reclaimed by garbage collection.</summary>
// Token: 0x06000004 RID: 4 RVA: 0x00002118 File Offset: 0x00000318
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
protected virtual void Finalize()
{
}
/// <summary>Serves as a hash function for a particular type. </summary>
/// <returns>A hash code for the current <see cref="T:System.Object" />.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x06000005 RID: 5 RVA: 0x0000211C File Offset: 0x0000031C
public virtual int GetHashCode()
{
return object.InternalGetHashCode(this);
}
/// <summary>Gets the type of the current instance.</summary>
/// <returns>The exact runtime type of the current instance.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x06000006 RID: 6
[MethodImpl(MethodImplOptions.InternalCall)]
public extern Type GetType();
/// <summary>Creates a shallow copy of the current <see cref="T:System.Object" />.</summary>
/// <returns>A shallow copy of the current <see cref="T:System.Object" />.</returns>
// Token: 0x06000007 RID: 7
[MethodImpl(MethodImplOptions.InternalCall)]
protected extern object MemberwiseClone();
/// <summary>Returns a string that represents the current object.</summary>
/// <returns>A string that represents the current object.</returns>
/// <filterpriority>2</filterpriority>
// Token: 0x06000008 RID: 8 RVA: 0x00002124 File Offset: 0x00000324
public virtual string ToString()
{
return this.GetType().ToString();
}
/// <summary>Determines whether the specified <see cref="T:System.Object" /> instances are the same instance.</summary>
/// <returns>true if <paramref name="objA" /> is the same instance as <paramref name="objB" /> or if both are null references; otherwise, false.</returns>
/// <param name="objA">The first object to compare. </param>
/// <param name="objB">The second object to compare. </param>
/// <filterpriority>2</filterpriority>
// Token: 0x06000009 RID: 9 RVA: 0x00002134 File Offset: 0x00000334
[ReliabilityContract(Consistency.WillNotCorruptState, Cer.Success)]
public static bool ReferenceEquals(object objA, object objB)
{
return objA == objB;
}
// Token: 0x0600000A RID: 10
[MethodImpl(MethodImplOptions.InternalCall)]
internal static extern int InternalGetHashCode(object o);
// Token: 0x0600000B RID: 11
[MethodImpl(MethodImplOptions.InternalCall)]
internal extern IntPtr obj_address();
// Token: 0x0600000C RID: 12 RVA: 0x0000213C File Offset: 0x0000033C
private void FieldGetter(string typeName, string fieldName, ref object val)
{
}
// Token: 0x0600000D RID: 13 RVA: 0x00002140 File Offset: 0x00000340
private void FieldSetter(string typeName, string fieldName, object val)
{
}
}
}