Forum Discussion

Dong Xie's avatar
Dong Xie
Copper Contributor
Mar 15, 2017
Solved

Re: Welcome to the Blockchain AMA!

Hi, Dong Xie from Oxford, U.K. Got a quick question, is that possible to use C# as the scripting language for Etherum/Smart Contract?
  • Isaac Wooden's avatar
    Mar 15, 2017

    For Ethereum specifically, the big requirement is that your programs compile down to Ethereum Virtual Machine (EVM) opcodes. Theoretically there's no reason you couldn't write a C# compiler for the EVM, though you wouldn't have access to a lot of the standard libraries due to additional limitations of the system - a big one is that all code has to be nondeterministic, because if different nodes get different results, you will have a consensus failure.

     

    Right now the major scripting language for Ethereum smart contracts is Solidity, which is syntactically similar to Javascript. Research is ongoing into other languages that target the EVM.

     

    If you're interested in using C# in a blockchain context, the NEthereum libraries work well for integrating traditional C# programs with an Ethereum deployment. In the future, you will also be able to use C# as the language for Cryptlet development, enabling you to perform off-chain computations in C# and writing blockchain transactions as a standardized data object.

Resources