HomeDeveloper MaterialsCommunicate via JSON/RPCNethereum C#

Nethereum C#

An example application on Kaleido using Nethereum. This demonstrates how to connect to a Kaleido node using basic auth and retrieve the latest block number on the chain.


  1. A .NET-compatible IDE (e.g. Visual Studio)


  1. Clone the Kaleido Examples project.
  2. Using Visual Studio or another .NET-compatible IDE, open the Application.sln file in the c#/nethereum/gethsubdirectory of this project.
  3. In Application/Program.cs:
    • Replace the RPC_ENDPOINT placeholder with the RPC endpoint for your node.
    • Replace the USER placeholder with the basic auth credentials username.
    • Replace the PASS placeholder with the basic auth credentials password.
  4. Run the program in Debug mode and open the application output window to see the latest block number. If you do NOT run in Debug mode, the program will be unable to print output.