54 lines
3.0 KiB
C#
54 lines
3.0 KiB
C#
using System;
|
|
using System.Runtime.InteropServices;
|
|
using System.Runtime.Serialization;
|
|
|
|
namespace System
|
|
{
|
|
/// <summary>The exception that is thrown when there is an attempt to dereference a null object reference.</summary>
|
|
/// <filterpriority>1</filterpriority>
|
|
// Token: 0x02000696 RID: 1686
|
|
[ComVisible(true)]
|
|
[Serializable]
|
|
public class NullReferenceException : SystemException
|
|
{
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.NullReferenceException" /> class, setting the <see cref="P:System.Exception.Message" /> property of the new instance to a system-supplied message that describes the error, such as "The value 'null' was found where an instance of an object was required." This message takes into account the current system culture.</summary>
|
|
// Token: 0x06003FE4 RID: 16356 RVA: 0x000D7A20 File Offset: 0x000D5C20
|
|
public NullReferenceException()
|
|
: base(Locale.GetText("A null value was found where an object instance was required."))
|
|
{
|
|
base.HResult = -2147467261;
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.NullReferenceException" /> class with a specified error message.</summary>
|
|
/// <param name="message">A <see cref="T:System.String" /> that describes the error. The content of <paramref name="message" /> is intended to be understood by humans. The caller of this constructor is required to ensure that this string has been localized for the current system culture. </param>
|
|
// Token: 0x06003FE5 RID: 16357 RVA: 0x000D7A40 File Offset: 0x000D5C40
|
|
public NullReferenceException(string message)
|
|
: base(message)
|
|
{
|
|
base.HResult = -2147467261;
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.NullReferenceException" /> class with a specified error message and a reference to the inner exception that is the cause of this exception.</summary>
|
|
/// <param name="message">The error message that explains the reason for the exception. </param>
|
|
/// <param name="innerException">The exception that is the cause of the current exception. If the <paramref name="innerException" /> parameter is not null, the current exception is raised in a catch block that handles the inner exception. </param>
|
|
// Token: 0x06003FE6 RID: 16358 RVA: 0x000D7A54 File Offset: 0x000D5C54
|
|
public NullReferenceException(string message, Exception innerException)
|
|
: base(message, innerException)
|
|
{
|
|
base.HResult = -2147467261;
|
|
}
|
|
|
|
/// <summary>Initializes a new instance of the <see cref="T:System.NullReferenceException" /> class with serialized data.</summary>
|
|
/// <param name="info">The object that holds the serialized object data. </param>
|
|
/// <param name="context">The contextual information about the source or destination. </param>
|
|
// Token: 0x06003FE7 RID: 16359 RVA: 0x000D7A6C File Offset: 0x000D5C6C
|
|
protected NullReferenceException(SerializationInfo info, StreamingContext context)
|
|
: base(info, context)
|
|
{
|
|
}
|
|
|
|
// Token: 0x0400194F RID: 6479
|
|
private const int Result = -2147467261;
|
|
}
|
|
}
|