I am an application programmer primarily working in VC++ (MFC) & Sockets.
I also have some VB knowledge too.
This is my first question here in VC++.Net zone.
If this question is invalid please spare me.
Q1. Does C# & VC++.Net means the same? If not what are the differences.
Q2. Does C# support use of Pointers?
Q3. Can the dll's that i use with my VC++ SDI MFC Appllications be used with C# application without modifications. The dll's does the loww level job such as reading Hard disk sectors.
Waiting for comments
Regards
Microsoft DevelopmentVisual C++.NET
Last Comment
mathu76
8/22/2022 - Mon
AlexFM
Q1. Using managed C++ you can do all things available in C# and much more. Managed C++ allows writing mixed applications which use both managed and unmanaged code (and they can use any legacy C++ code directly). However, managed C++ will be changed significantly in new release of Visual Studio 2005. If you want to start developing in managed C++, possibly it is better to wait for 2005 release.
Q2. Yes - see Unsafe Programming.
Q3. C# can use two types of unmanaged libraries:
- COM libraries - directly.
- Dll which exposes C-style interface (API) - like API calls in VB6. See PInvoke.
Jaime Olivares
C# and managed C++ have big similarities, as AlexFM explained, but definitively them are not the same language. Them have different purposes. C# is a high level language, intended IMHO to compete directly with Java, C++ is a mid level language, it is more "sticked" to hardware and has a better performance for highly intensive calculation tasks.
Here is an article explaining some differences: http://www.itgatewaysolutions.com/articles/CPlusAndCSharp.htm
Q2. Yes - see Unsafe Programming.
Q3. C# can use two types of unmanaged libraries:
- COM libraries - directly.
- Dll which exposes C-style interface (API) - like API calls in VB6. See PInvoke.