Tying your project to C# is about as risky as tying it to Windows ie not very.
Windows won't disappear overnight no matter what happens barring extinction level events.
Other than that it's hard to say because it simply depends on the project you're developing. The likelihood that something is developed now and will require absolutely no maintenance or modification for the next 10+ years is... remote.
But just look at the difference between now and 10 years ago:
- Java was around 10 years ago but those JDKs (1.0/1.1) have long since been EOLed and those apps will have needed updating to work on Java 5+ (the current minimum supported JDK);
- Apps written in C/C++ for the Win32 API are probably still mostly OK although Vista (and to a lesser extent 2000/XP) did break some things that worked just fine on Win95/98. Still, DOS games from that era (for example) typically still run on emulators;
- Perl is still around and still on version 5;
- There are some COBOL applications that have been running for decades although there's almost zero chance any of them have gone 10 years without modification.
So I really don't know what you're expecting. Software is a living breathing thing. If you don't feed it and maintain it, it dies. What you should be concerned with is catastrophic change (like if you'd bet the farm on the success of BeOS for example) and anything tied to Windows or Linux will be just fine. Java, .Net and Python will still (I'd bet) be around. But care will be required.