MegaBites-AI/Windows-powershell
0372
1// Copyright (c) Microsoft Corporation.2// Licensed under the MIT License.3 4namespace System.Management.Automation.Language5{6 /// <summary>7 /// This type is introduced to provide a way to pass null into a .NET method that has a string parameter.8 /// </summary>9 public class NullString10 {11 #region private_members12 13 // Private member for instance.14 15 #endregion private_members16 17 #region public_property18 19 /// <summary>20 /// This overrides ToString() method and returns null.21 /// </summary>22 public override string ToString()23 {24 return null;25 }26 27 /// <summary>28 /// This returns the singleton instance of NullString.29 /// </summary>30 public static NullString Value { get; } = new NullString();31 32 #endregion public_property33 34 #region private Constructor35 36 /// <summary>37 /// This is a private constructor, meaning no outsiders have access.38 /// </summary>39 private NullString()40 {41 }42 43 #endregion private Constructor44 }45}46 