MetadataBuilder.AddConstant(EntityHandle, Object) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Adds a default value for a parameter, field or property.
public:
System::Reflection::Metadata::ConstantHandle AddConstant(System::Reflection::Metadata::EntityHandle parent, System::Object ^ value);
public System.Reflection.Metadata.ConstantHandle AddConstant (System.Reflection.Metadata.EntityHandle parent, object? value);
public System.Reflection.Metadata.ConstantHandle AddConstant (System.Reflection.Metadata.EntityHandle parent, object value);
member this.AddConstant : System.Reflection.Metadata.EntityHandle * obj -> System.Reflection.Metadata.ConstantHandle
Public Function AddConstant (parent As EntityHandle, value As Object) As ConstantHandle
Parameters
- parent
- EntityHandle
The parent entity handle, which can be one of the following: ParameterHandle, FieldDefinitionHandle, or PropertyDefinitionHandle.
- value
- Object
The constant value.
Returns
A handle to the added constant.
Exceptions
parent
doesn't have the expected handle kind.
Remarks
Entries may be added in any order. The table is automatically sorted when serialized.
Applies to
ทํางานร่วมกับเราใน GitHub
แหล่งที่มาสำหรับเนื้อหานี้สามารถพบได้บน GitHub ซึ่งคุณยังสามารถสร้างและตรวจสอบปัญหาและคำขอดึงข้อมูลได้ สำหรับข้อมูลเพิ่มเติม ให้ดูคู่มือผู้สนับสนุนของเรา