How to install C# on Endless OS?

after installing the monodevelop flatpak you should be able to use
flatpak list | grep mono
to find out the name which you may substitute for <env> in the following command:
flatpak run --command=bash <env>
See also this posting about Java.