.. index:: 
  !DocumentInfoDictionary.set Method
  
.. _id3_document_document_info_dictionary_set_class_method:

===============================================================================
DocumentInfoDictionary.set Method
===============================================================================

Module: :ref:`DocumentInfoDictionary<id3_document_document_info_dictionary_class>`

Definition
----------

Sets an item of the DocumentInfoDictionary object.


.. tab-set::

    .. tab-item:: Python
      :sync: Python

      .. code:: Python

        set(self, key: str, document_info_item: DocumentInfo) -> None

      **Parameters**

        .. line-block::

          ``key`` str
          :guilabel:`in` Unique key of the DocumentInfo item to set.

          ``document_info_item`` :ref:`DocumentInfo<id3_document_document_info_class>`
          :guilabel:`in` DocumentInfo item to set.


      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


    .. tab-item:: Dart
      :sync: Dart

      .. code:: Dart

        void set(String? key, DocumentInfo documentInfoItem)

      **Parameters**

        .. line-block::

          ``key`` String
          :guilabel:`in` Unique key of the DocumentInfo item to set.

          ``documentInfoItem`` :ref:`DocumentInfo<id3_document_document_info_class>`
          :guilabel:`in` DocumentInfo item to set.


      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


    .. tab-item:: C#
      :sync: C#

      .. code:: C#

        public void Set(string key, DocumentInfo documentInfoItem)

      **Parameters**

        .. line-block::

          ``key`` string
          :guilabel:`in` Unique key of the DocumentInfo item to set.

          ``documentInfoItem`` :ref:`DocumentInfo<id3_document_document_info_class>`
          :guilabel:`in` DocumentInfo item to set.


      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


    .. tab-item:: Java
      :sync: Java

      .. code:: Java

        public void set(String key, DocumentInfo documentInfoItem) throws DocumentException

      **Parameters**

        .. line-block::

          ``key`` String
          :guilabel:`in` Unique key of the DocumentInfo item to set.

          ``documentInfoItem`` :ref:`DocumentInfo<id3_document_document_info_class>`
          :guilabel:`in` DocumentInfo item to set.


      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


    .. tab-item:: Swift
      :sync: Swift

      .. code:: Swift

        public func set(key: String, documentInfoItem: DocumentInfo) throws

      **Parameters**

        .. line-block::

          ``key`` String
          :guilabel:`in` Unique key of the DocumentInfo item to set.

          ``documentInfoItem`` :ref:`DocumentInfo<id3_document_document_info_class>`
          :guilabel:`in` DocumentInfo item to set.


      **Exceptions**

        .. line-block::

          :ref:`DocumentException<id3_document_document_exception>`
          An error has occurred during Document Library execution.


    .. tab-item:: C
      :sync: C

      .. code:: C

        int id3DocumentInfoDictionary_Set (
            ID3_DOCUMENT_INFO_DICTIONARY hDocumentInfoDictionary, 
            const char * key, 
            ID3_DOCUMENT_INFO hDocumentInfoItem)

      **Parameters**

        .. line-block::

          ``hDocumentInfoDictionary`` :ref:`ID3_DOCUMENT_INFO_DICTIONARY<id3_document_document_info_dictionary_class>`
          :guilabel:`in` Handle to the DocumentInfoDictionary object.

          ``key`` const char *
          :guilabel:`in` Unique key of the DocumentInfo item to set.

          ``hDocumentInfoItem`` :ref:`ID3_DOCUMENT_INFO<id3_document_document_info_class>`
          :guilabel:`in` DocumentInfo item to set.


      **Returns**

        .. line-block::

          ``int``
          An error code.
          See :ref:`id3DocumentError<id3_document_document_error_enum>` file for the list of possible error codes.


