.. index:: 
  !DocumentInfoDictionary.containsKey Method
  
.. _id3_document_document_info_dictionary_contains_key_class_method:

===============================================================================
DocumentInfoDictionary.containsKey Method
===============================================================================

Module: :ref:`DocumentInfoDictionary<id3_document_document_info_dictionary_class>`

Definition
----------

Determines whether the DocumentInfoDictionaryobject contains the specified key.


.. tab-set::

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

      .. code:: Python

        contains_key(self, key: str) -> bool

      **Parameters**

        .. line-block::

          ``key`` str
          :guilabel:`in` The key to locate in the DocumentInfo object.


      **Returns**

        .. line-block::

          ``bool``
          true if the DocumentInfo object contains an element with the specified key, otherwise false.

      **Exceptions**

        .. line-block::

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


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

      .. code:: Dart

        bool containsKey(String? key)

      **Parameters**

        .. line-block::

          ``key`` String
          :guilabel:`in` The key to locate in the DocumentInfo object.


      **Returns**

        .. line-block::

          ``bool``
          true if the DocumentInfo object contains an element with the specified key, otherwise false.

      **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 bool ContainsKey(string key)

      **Parameters**

        .. line-block::

          ``key`` string
          :guilabel:`in` The key to locate in the DocumentInfo object.


      **Returns**

        .. line-block::

          ``bool``
          true if the DocumentInfo object contains an element with the specified key, otherwise false.

      **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 boolean containsKey(String key) throws DocumentException

      **Parameters**

        .. line-block::

          ``key`` String
          :guilabel:`in` The key to locate in the DocumentInfo object.


      **Returns**

        .. line-block::

          ``boolean``
          true if the DocumentInfo object contains an element with the specified key, otherwise false.

      **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 containsKey(key: String) throws -> Bool

      **Parameters**

        .. line-block::

          ``key`` String
          :guilabel:`in` The key to locate in the DocumentInfo object.


      **Returns**

        .. line-block::

          ``Bool``
          true if the DocumentInfo object contains an element with the specified key, otherwise false.

      **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_ContainsKey (
            ID3_DOCUMENT_INFO_DICTIONARY hDocumentInfoDictionary, 
            const char * key, 
            bool * result)

      **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` The key to locate in the DocumentInfo object.

          ``result`` bool *
          :guilabel:`out` true if the DocumentInfo object contains an element with the specified key, otherwise false.


      **Returns**

        .. line-block::

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


