Share via


SelectionRangeConverter.CreateInstance 方法

定義

使用指定的型別描述項以及物件的屬性值集合,建立 SelectionRange 物件。

public:
 override System::Object ^ CreateInstance(System::ComponentModel::ITypeDescriptorContext ^ context, System::Collections::IDictionary ^ propertyValues);
public override object CreateInstance (System.ComponentModel.ITypeDescriptorContext context, System.Collections.IDictionary propertyValues);
public override object CreateInstance (System.ComponentModel.ITypeDescriptorContext? context, System.Collections.IDictionary propertyValues);
override this.CreateInstance : System.ComponentModel.ITypeDescriptorContext * System.Collections.IDictionary -> obj
Public Overrides Function CreateInstance (context As ITypeDescriptorContext, propertyValues As IDictionary) As Object

參數

context
ITypeDescriptorContext

ITypeDescriptorContext,提供格式內容。

propertyValues
IDictionary

IDictionary,其中含有新的屬性值。

傳回

如果成功的話,則為新建立的 SelectionRange,否則,這個方法會擲回例外狀況。

例外狀況

propertyValuesnull 或其 StartEnd 專案無法轉換成 SelectionRange

備註

CreateInstance使用 方法,藉由建立修改過的 物件版本,對現有的不可變物件進行變更。 這個方法預期 propertyValues 參數具有 索引鍵值為 StartEnd 的專案,每個元素都有對應的 DateTime 值。

適用於

另請參閱