ken du

ken du

  • NA
  • 17
  • 0

Class name conflicts in C# and managed C++ dll in VS 2003

Jul 17 2007 12:00 PM
I created a project in .net 2003. In this project, the c# code will call a managed dll which is built by C++. In the dll, it defines some classes whose names conflict with the classes from .net framework. For example: Stream, Array, in C++ dll and System.IO.Stream, System.Collections.Array in C#. So, when i compile the project, all the c# code must include the namespace like System.IO.Stream. It is grotty and it is more important that the c# code has been written before the C++ dll and it means enormous and boring work to change the c# code. I have tried to find and set the corresponding compile options to overcome this problem. But nothing works. Please help me and any suggestions are appreciated!

Answers (8)