I am working to develop an SDK that will allow the users to use it and write code in C# or Java.
To achieve this most optimally, do I have to write the SDK in both languages? That would be a lot of code repetitions albeit in 2 different languages, and the maintenance overhead would be very high.
Are there efficient ways to solve this problem? What will happen if someday we think of adding a 3rd programming language support for the SDK?
Please note that I don't mind having an API instead of SDK. The idea is simple -- it's basically an interface or kit that would provide users to make simple calls to it to perform certain complex actions, all complexity being abstracted into the API or SDK.
To avoid code duplication, there are different options.
It depends on your project, the people who will implement it and on your future goals what the best solution is.