CRIWARE for C#
Search Results for

    Show / Hide Table of Contents

    Struct NativeString

    Blittable文字列型

    Inherited Members
    ValueType.Equals(object)
    ValueType.GetHashCode()
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: CriWare.InteropHelpers
    Assembly: CriWare.CriBase.dll
    Syntax
    public struct NativeString
    Remarks

    ポインタによる文字列を表現する値です。 stringへのキャストが可能です。

    Methods

    GetUnsafeStringPointer()

    文字列ポインタの取得

    Declaration
    public IntPtr GetUnsafeStringPointer()
    Returns
    Type Description
    IntPtr

    ネイティブ文字列へのポインタ

    ToString()

    Returns the fully qualified type name of this instance.

    Declaration
    public override string ToString()
    Returns
    Type Description
    string

    The fully qualified type name.

    Overrides
    ValueType.ToString()

    ToStringCached()

    LE Pro

    マネージド文字列への変換(キャッシュあり)

    Declaration
    public string ToStringCached()
    Returns
    Type Description
    string

    変換後の文字列

    Remarks

    ToString()による変換では、呼び出しのたびにstringを新たにヒープ上に確保します。 本APIでは指し示すネイティブ文字列ポインタが同一の場合はキャッシュされた文字列を返すため、ヒープへの文字列確保は初回のみとなります。 ただし、ネイティブ文字列領域が動的に書き換わっている場合は現在の状態を取得できないため、ToString()による変換をおすすめします。

    Operators

    implicit operator string(NativeString)

    stringへのキャスト

    Declaration
    public static implicit operator string(NativeString native)
    Parameters
    Type Name Description
    NativeString native
    Returns
    Type Description
    string
    In this article
    Back to top Generated by DocFX