Results 1 to 4 of 4

Thread: Difference between C# and C++ .NET

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    146

    Difference between C# and C++ .NET

    What's the difference, apart from syntax and semantics, the difference between Visual C++ (using .NET framework) and C#?



    If I use .NET framework in C++, will it compile to native code?
    If I use .NET framework, will the code automatically become 'managed'.
    I'm not clear about managed/unmanaged and CLI stuff.

    And lastly, If I use .NET framework in C++, can I add reference to that project in other .NET projects?


    Thanks!

  2. #2
    Pro Grammar chris128's Avatar
    Join Date
    Jun 2007
    Location
    England
    Posts
    7,604

    Re: Difference between C# and C++ .NET

    Dont know if this helps directly but I asked a question about C++ and the .NET framework a year or so ago, you might get some answers from the replies I received: http://www.vbforums.com/showthread.php?t=516252
    My free .NET Windows API library (Version 2.2 Released 12/06/2011)

    Blog: cjwdev.wordpress.com
    Web: www.cjwdev.co.uk


  3. #3

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    146

    Re: Difference between C# and C++ .NET

    How do I write unmanaged C++ .NET code?

  4. #4

    Thread Starter
    Addicted Member
    Join Date
    Sep 2002
    Posts
    146

    Re: Difference between C# and C++ .NET

    library.dll

    Code:
    namespace Library
    {
    	class testclass
    	{
    		private:
    			int a;
    			int b;
    		public:			
    			void set_a(int value){a = value;}
    			void set_b(int value){b = value;}
    			int add(){return a + b;}
    	};
    }
    I can't add reference to that DLL in my C# project. It says that DLL has no CLR assembly or something like that.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width