
:html_theme.sidebar_secondary.remove:

.. py:currentmodule:: cantera


.. DO NOT EDIT.
.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY.
.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE:
.. "examples/dotnet/Application.cs"
.. LINE NUMBERS ARE GIVEN BELOW.

.. only:: html

    .. note::
        :class: sphx-glr-download-link-note

        :ref:`Go to the end <sphx_glr_download_examples_dotnet_Application.cs>`
        to download the full example code.

.. rst-class:: sphx-glr-example-title

.. _sphx_glr_examples_dotnet_Application.cs:

C# Application Example
======================

Demonstrates how to retrieve and modify global properties of the Application class
using Cantera's .NET API.

.. tags:: .NET

.. GENERATED FROM PYTHON SOURCE LINES 9-28

.. code-block:: C#

    /// This file is part of Cantera. See License.txt in the top-level directory or
    /// at https://cantera.org/license.txt for license and copyright information.

    using Cantera;

    // read the current Version and the git commit
    Console.WriteLine("Version: " + Application.Version);
    Console.WriteLine("Git Commit: " + Application.GitCommit);

    // modify and read the Cantera data directories
    var homeDir = Environment.GetFolderPath(Environment.SpecialFolder.UserProfile);
    Application.DataDirectories.Add(homeDir);
    Application.DataDirectories.AddAssemblyDirectory();

    Console.WriteLine("Data Directories:");

    foreach(var dir in Application.DataDirectories)
    {
        Console.WriteLine("    " + dir);
    }

.. _sphx_glr_download_examples_dotnet_Application.cs:

.. only:: html

  .. container:: sphx-glr-footer sphx-glr-footer-example

    .. container:: sphx-glr-download sphx-glr-download-python

      :download:`Download C# source code: Application.cs <Application.cs>`

    .. container:: sphx-glr-download sphx-glr-download-zip

      :download:`Download zipped: Application.zip <Application.zip>`


.. only:: html

 .. rst-class:: sphx-glr-signature

    `Gallery generated by Sphinx-Gallery <https://sphinx-gallery.github.io>`_
