Files
archived-g-helper/app/NvAPIWrapper/Native/General/Structures/ShortString.cs
2023-05-06 14:40:52 +02:00

29 lines
693 B
C#

using System.Runtime.InteropServices;
using NvAPIWrapper.Native.Interfaces;
namespace NvAPIWrapper.Native.General.Structures
{
[StructLayout(LayoutKind.Sequential, CharSet = CharSet.Ansi)]
internal struct ShortString : IInitializable
{
public const int ShortStringLength = 64;
[MarshalAs(UnmanagedType.ByValTStr, SizeConst = ShortStringLength)]
private readonly string _Value;
public string Value
{
get => _Value;
}
public ShortString(string value)
{
_Value = value ?? string.Empty;
}
public override string ToString()
{
return Value;
}
}
}