Starting with Scratch - Should I use (MS Visual Studio) C # or (MS Visual Studio) C ++?

I am starting a new project from scratch. I am trying to determine if I should use C # C ++. In any case, it will be a version of MS Visual 2010 Express.

In terms of using the application, I am sure that it does not matter to the end user of the application that I want to build.

For me, though ... two things. 1) I need to use a database and use MS SQL Server. Should this affect C # or C ++? (but I think C # is a little easier ...) and 2) there is an open source library that I at some point want to include in my application. It is written in C ++.

I can also encode. Nowadays, C # seems simpler. But C ++ allowed me to use this library ...

What else should I consider here?

Thanks in advance!

-Adeena

+4
source share
4 answers

C # is easier. The base class library allows you to configure affiliate communications with SQL Server. This app will be easier to maintain. And you can always call external .dll writtern methods in C ++ from a C # application using the Interop services function.

See also :

+7
source

If you think C # is easier, then use C #, if you use open source lib, you want to use Invoke for the platform in C #.

+2
source

You can use and exit OK at the end. The key to virtually all software development is to reduce overall maintenance costs, and in this light, C # is probably easier to maintain than C ++.

Your database will not make much difference because both languages ​​are designed to be used with the .NET platform - and you can use Language Integrated Query (LINQ) to wrap the database tables in real objects to help abstract database operations, which should ease the situation.

EDIT:

LINQ seems to be for C # only. I always thought that it was for the whole framework ... This factor should be enough to bring you to C #.

You can call an unmanaged C ++ method from a C # application using P / Invoke.

+2
source

C # has a way, a way to improve interaction with the database using LINQ. You can simply use P / Invoke to link to the C ++ DLL or C ++ / CLI if you really need it desperately.

+1
source

All Articles