> For the complete documentation index, see [llms.txt](https://mariadb.com/docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://mariadb.com/docs/gridgain/gridgain-8/gridgain8-get-started/quick-start/dotnet.md).

# .NET/C\#

Use .NET Core to build and run a simple Hello World example that starts a node, puts a value into the cache, and then gets the value.

This chapter explains how to use .NET Core to build and run a simple Hello World example that starts a node, puts a value into the cache, and then gets the value.

## Prerequisites

GridGain.NET was officially tested on:

| Requirement | Details                                                                                                                                                        |
| ----------- | -------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| JDK         | JDK 17 or later                                                                                                                                                |
| .NET        | Any runtime that implements .NET Standard 2.0: .NET Framework 4.6.1+, .NET Core 2.0+, .NET 5+. The libraries target `netstandard2.0`, `net8.0`, and `net10.0`. |

### (Optional) Open Ports

Depending on your environment and what your plan is, you may want to open additional ports. GridGain uses the following ports:

* 47100-47200 — ports used by GridGain nodes to communicate. Specific ports used depend on node configuration.
* 47500-47600 — ports used by GridGain nodes to discover other nodes in the network. Specific ports used depend on node configuration.
* 10800 — the port used for [thin clients](/docs/connectors/gridgain-8/clients/getting-started-with-thin-clients.md), [JDBC](/docs/connectors/gridgain-8/sql/jdbc/jdbc-driver.md) and [ODBC](/docs/connectors/gridgain-8/sql/odbc/odbc-driver.md) connections.
* 8080 — the port used for [REST API](/docs/gridgain/gridgain-8/reference/rest-api.md).
* 11211 — the port used by [control script](/docs/gridgain/gridgain-8/reference/cli-tool.md) calls. This port should only be opened on nodes that need to send control script messages to other nodes.

## Running a Simple .NET Example

{% hint style="info" %}
GridGain for .NET supports a thick client and a thin client. As this guide focuses on the *thick* client, you can run the example below after adding the GridGain-Ignite library package. You do not need to download and install the GridGain distribution to run the example. See [Thick vs. Thin Clients section](https://mariadb.com/docs/gridgain/gridgain-8/gridgain8-get-started/quick-start/pages/OUSGdNs5HGVTk0HR0E50#thick-vs.-thin-clients) for more information about the differences between thick and thin clients in GridGain.

For information about the .NET thin client, see [.NET Thin Client](/docs/connectors/gridgain-8/clients/dotnet-thin-client.md).
{% endhint %}

{% hint style="warning" %}
If you use the thick client without downloading and installing GridGain distribution, some functionality (Logging, etc.) will be missing or not configured.
{% endhint %}

1. Use the CLI (unix shell, Windows CMD or PowerShell, etc.) to run the following two commands:

   `> dotnet new console`

   This creates an empty project, which includes a project file with metadata and a .cs file with code.

   And:

   ```shell
   > dotnet add package GridGain --version {gridgain.version}
   ```

   This modifies the project file - `.csproj` - to add dependencies.
2. Open `Program.cs` in any text editor and replace the contents as follows:

   ```csharp
   using System;
   using Apache.Ignite.Core;
   using GridGain.Core;

   namespace GridGain.GettingStarted
   {
       class Program
       {
           static void Main()
           {
               var cfg = new IgniteConfiguration
               {
                   PluginConfigurations = new[]
                   {
                       // Enable GridGain plugin.
                       new GridGainPluginConfiguration()
                   }
               };

               IIgnite ignite = Ignition.Start(cfg);

               var cache = ignite.GetOrCreateCache<int, string>("my-cache");
               cache.Put(1, "Hello, World");
               Console.WriteLine(cache.Get(1));

               IGridGain gridGain = ignite.GetGridGain();
               Console.WriteLine(gridGain.GetProduct().GetLicense());
           }
       }
   }
   ```
3. Save and then run the program:

   `> dotnet run`

As a result, you should see a node launch and the "Hello, World" text displayed right after the launch.

## Next Steps

From here, you may want to:

* Read more about using GridGain: [Developers Guide](/docs/gridgain/gridgain-8/gridgain8-development.md), [Administrators Guide](/docs/gridgain/gridgain-8/gridgain8-management.md)
* Use [GridGain Control Center](/docs/tools/enterprise/control-center.md) to monitor your cluster
