Absolutely possible. The most smooth way I know is using Mono on Linux.
See:
http://en.wikipedia.org/wiki/Mono_%28software%29[
^],
http://www.mono-project.com/[
^].
Mono provides good implementation of CLR and very tight compatibility with .NET. It implements all the standard library and some non-standard ones, importantly
System.Windows.Forms
, but unfortunately not WPF. I run on Linux all my Forms applications built on Windows,
without recompilation. Never faced any problems with Forms starting from the time when .NET version 3.5 was introduced. Also, I recommend to target applications to .NET Framework v.3.5 even now.
Now, the cross-platform IDE is available, called MonoDevelop, see:
http://en.wikipedia.org/wiki/MonoDevelop[
^],
http://monodevelop.com/[
^].
It is available for both Windows and Linux, but you don't have to use it.
This IDE is pretty good and it does all it has to, but not as good as Visual Studio. So, I use very little of MonoDevelop, only for debugging of platform-specific codes. In fact, I develop on Windows with Visual Studio even platform-specific non-Windows part of codes; with .NET this is quite possible unless you don't debug it, so I use MonoDevelop mostly for debugging. I also develop on Max OS X these days, where CLR development is much more difficult then in Linux, and still work mostly on Windows and Visual Studio, having to debug the code on other platforms pretty rarely — I manage to get it to work just using Windows.
You can also develop using C++/CLI for all the platforms.
Such possibilities are really amazing and were never available earlier.
Beyond .NET, CLR and Mono, there are other ways to develop cross-platform UI. Unlike CLR, they all require recompilation on each platform. They are based on cross-platform Qt framework (formerly form Trolltech, now supported by Nokia) or GTK+ toolkit, both available on Windows, Linux, Max OS X and other platforms. See:
http://en.wikipedia.org/wiki/Qt_%28framework%29[
^],
http://qt.nokia.com/[
^],
http://en.wikipedia.org/wiki/GTK[
^],
http://www.gtk.org/[
^].
I'm not really experienced with Qt or GTK+, just minimally tried them out.
I listed all the cross-platform UI possibilities involving C++ or C# I know at the moment.
I did not mention Java or Free Pascal because you inquired only on C++ and C#.
—SA