Files
PowerShell-PowerShell/src/System.Management.Automation/engine/NullString.cs
T
PowerShell Team 60b3b304f2 Move files from psl-monad submodule to super-project
This commit uses psl-monad branch source-depot 7209cb9
And corresponds to [SD:688741]
2016-03-30 17:16:23 -07:00

51 lines
1.3 KiB
C#

/********************************************************************++
Copyright (c) Microsoft Corporation. All rights reserved.
--********************************************************************/
using System;
namespace System.Management.Automation.Language
{
/// <summary>
/// This type is introduced to provide a way to pass null into a .NET method that has a string parameter
/// </summary>
public class NullString
{
#region private_members
// Private member for instance.
private static readonly NullString _value = new NullString();
#endregion private_members
#region public_property
/// <summary>
/// This overrides ToString() method and returns null.
/// </summary>
public override string ToString()
{
return null;
}
/// <summary>
/// This returns the singleton instance of NullString
/// </summary>
public static NullString Value
{
get { return _value; }
}
#endregion public_property
#region private Constructor
/// <summary>
/// This is a private constructor, meaning no outsiders have access.
/// </summary>
private NullString()
{
}
#endregion private Constructor
}
}