BlobReader.ReadConstant(ConstantTypeCode) Metoda

Definicja

Odczytuje stałą wartość (patrz ECMA-335 Partition II sekcja 22.9) z bieżącej pozycji.

public:
 System::Object ^ ReadConstant(System::Reflection::Metadata::ConstantTypeCode typeCode);
public object? ReadConstant (System.Reflection.Metadata.ConstantTypeCode typeCode);
public object ReadConstant (System.Reflection.Metadata.ConstantTypeCode typeCode);
member this.ReadConstant : System.Reflection.Metadata.ConstantTypeCode -> obj
Public Function ReadConstant (typeCode As ConstantTypeCode) As Object

Parametry

typeCode
ConstantTypeCode

Zwraca

Object

Wartość stałej pola. Aby uniknąć przydzielania obiektu, użyj metod Read* bezpośrednio.

Wyjątki

Błąd podczas odczytywania z obiektu blob.

typeCode nie jest prawidłowym ConstantTypeCodeelementem .

Uwagi

Stałe typu String są kodowane jako ciągi UTF16, używane ReadUTF16(Int32) do ich odczytywania.

Dotyczy