MetadataBuilder.ReserveUserString(Int32) 方法

定義

在使用者字串堆積上為指定長度的字串保留空間。

public:
 System::Reflection::Metadata::ReservedBlob<System::Reflection::Metadata::UserStringHandle> ReserveUserString(int length);
public System.Reflection.Metadata.ReservedBlob<System.Reflection.Metadata.UserStringHandle> ReserveUserString (int length);
member this.ReserveUserString : int -> System.Reflection.Metadata.ReservedBlob<System.Reflection.Metadata.UserStringHandle>
Public Function ReserveUserString (length As Integer) As ReservedBlob(Of UserStringHandle)

參數

length
Int32

要保留的字元數。

傳回

已保留使用者字串的控制代碼,以及代表整個使用者字串 Blob (包括其長度和結束字元) 的 Blob。 此控制代碼可以在 LoadString(UserStringHandle) 中使用。 請使用 WriteUserString(String) 來填入 Blob 內容。

例外狀況

堆積上的剩餘空間太小,無法容納字串。

length 為負。

適用於