forked from ClearFoundry/ClearScript
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathNothing.cs
More file actions
48 lines (42 loc) · 1.56 KB
/
Nothing.cs
File metadata and controls
48 lines (42 loc) · 1.56 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
using System.Runtime.InteropServices;
using Microsoft.ClearScript.Util;
namespace Microsoft.ClearScript.Windows
{
/// <summary>
/// Represents an empty object reference.
/// </summary>
/// <remarks>
/// When passed to a Windows Script engine, an instance of this class is marshaled as an empty
/// variant of type <c>VT_DISPATCH</c>. VBScript interprets this as the special object
/// reference
/// <c><see href="https://docs.microsoft.com/en-us/previous-versions//f8tbc79x(v=vs.85)">Nothing</see></c>.
/// In JScript it appears as a value that is equal to, but not strictly equal to,
/// <c><see href="https://developer.mozilla.org/en-US/docs/Glossary/Undefined">undefined</see></c>.
/// </remarks>
[Guid(TypeGuids.Nothing)]
public class Nothing
{
/// <summary>
/// The sole instance of the <see cref="Nothing"/> class.
/// </summary>
public static readonly Nothing Value = new Nothing();
private Nothing()
{
}
#region Object overrides
/// <summary>
/// Returns a string that represents the current object.
/// </summary>
/// <returns>A string that represents the current object.</returns>
/// <remarks>
/// The <see cref="Nothing"/> version of this method returns "[nothing]".
/// </remarks>
public override string ToString()
{
return "[nothing]";
}
#endregion
}
}