-
Notifications
You must be signed in to change notification settings - Fork 160
Expand file tree
/
Copy pathNothing.cs
More file actions
46 lines (40 loc) · 1.51 KB
/
Nothing.cs
File metadata and controls
46 lines (40 loc) · 1.51 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
// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT license.
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>
public class Nothing : INothingTag
{
/// <summary>
/// The sole instance of the <c><see cref="Nothing"/></c> class.
/// </summary>
public static readonly Nothing Value = new();
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 <c><see cref="Nothing"/></c> version of this method returns "[nothing]".
/// </remarks>
public override string ToString()
{
return "[nothing]";
}
#endregion
}
}