Results 1 to 4 of 4

Thread: C # using classes in C + +

  1. #1
    Join Date
    Aug 2009
    Posts
    36

    C # using classes in C + +

    With MS Visual Studio 2008 I have created a map of project.Maps contains 2 Projects. Project containing classes written in C + + and the other class written in C #. To avoid this i have written all the codes in C + +, C #, I searched for possibility of existing call of classes from C + + code in my C #. Thank you in advance for your answers.

  2. #2
    Join Date
    May 2008
    Posts
    2,297

    Re: C # using classes in C + +

    If you use the .Net version of C++ you can just reference the library and all your classes can be used.It seems that if you compile your C + + code as a library (static or dynamic) you can use code that is there in C #.

  3. #3
    Join Date
    Jan 2009
    Posts
    199

    Re: C # using classes in C + +

    Your project compiles C + + in a DLL. If you just want to make function calls but not handle classes from C #, through the PInvoke. Otherwise, if you want to manipulate classes, you can 1) Make your classes C + + COM component 2) Create a simple wrapper in C + + / CLI class that encapsulates your C + +.

  4. #4
    Join Date
    Dec 2008
    Posts
    177

    Re: C # using classes in C + +

    In C++, a structure is a class is members and base classes are public by default. In C# UtilityClass.MethodA() defines static class that is named UtilityClass that has a public method named MethodA.Use P / Invoke requires that the code is compiled into a DLL C (detail which is important), then you must create a C interface to your code.

Similar Threads

  1. Problem with Inner classes
    By Captain Carrot in forum Software Development
    Replies: 5
    Last Post: 11-03-2010, 02:14 PM
  2. What are an Autoloading Classes in PHP?
    By Flaco in forum Software Development
    Replies: 5
    Last Post: 06-03-2010, 06:49 AM
  3. Communication between two classes
    By ANSEL in forum Software Development
    Replies: 4
    Last Post: 04-12-2009, 06:43 PM
  4. Comparison of two classes
    By Chrisch in forum Software Development
    Replies: 3
    Last Post: 12-10-2009, 11:33 AM
  5. Classes in VB.NET
    By Samir_1 in forum Software Development
    Replies: 2
    Last Post: 10-04-2009, 12:07 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,023,347.20775 seconds with 17 queries