ICorDebugEval2::NewStringWithLength 方法ICorDebugEval2::NewStringWithLength Method

使用指定的內容,建立指定長度的字串。Creates a string of the specified length, with the specified contents.

語法Syntax

HRESULT NewStringWithLength (  
    [in] LPCWSTR               string,  
    [in] UINT                  uiLength  
);  

參數Parameters

string
在字串值的指標。[in] A pointer to the string value.

uiLength
在字串的長度。[in] Length of the string.

備註Remarks

如果字串的尾端 null 字元應該在 managed 字串中,則方法的呼叫端 NewStringWithLength 必須確定字串長度包含尾端的 null 字元。If the string's trailing null character is expected to be in the managed string, the caller of the NewStringWithLength method must ensure that the string length includes the trailing null character.

字串一律會建立線上程目前執行所在的應用程式域中。The string is always created in the application domain in which the thread is currently executing.

規格需求Requirements

平台: 請參閱 系統需求Platforms: See System Requirements.

標頭: CorDebug.idl、CorDebug.hHeader: CorDebug.idl, CorDebug.h

程式庫: CorGuids.libLibrary: CorGuids.lib

.NET Framework 版本:自 2.0 起可用Available since 2.0.NET Framework Versions: 自 2.0 起可用Available since 2.0