Click here to Skip to main content
15,889,176 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: C# send structure objects through socket Pin
ikurtz18-Dec-09 9:42
ikurtz18-Dec-09 9:42 
AnswerRe: C# send structure objects through socket Pin
N a v a n e e t h18-Dec-09 15:38
N a v a n e e t h18-Dec-09 15:38 
QuestionIssue Reading and Writing to Serial Port Pin
BubbaGeeNH17-Dec-09 5:38
BubbaGeeNH17-Dec-09 5:38 
AnswerRe: Issue Reading and Writing to Serial Port Pin
Rick Shaub18-Dec-09 9:05
Rick Shaub18-Dec-09 9:05 
GeneralRe: Issue Reading and Writing to Serial Port Pin
BubbaGeeNH22-Dec-09 3:59
BubbaGeeNH22-Dec-09 3:59 
GeneralRe: Issue Reading and Writing to Serial Port Pin
Luc Pattyn22-Dec-09 6:38
sitebuilderLuc Pattyn22-Dec-09 6:38 
QuestionExtension Methods feature over mixed solution (managed c++ to C#) [solved] Pin
Martin#17-Dec-09 2:12
Martin#17-Dec-09 2:12 
AnswerRe: Extension Methods feature over mixed solution (managed c++ to C#) Pin
N a v a n e e t h17-Dec-09 16:56
N a v a n e e t h17-Dec-09 16:56 
Not sure I got your question correctly. Are you saying that from C++/CLI you are unable to use the extension method like the way you used it in C#? If yes, C++/CLI won't support extension method and you can't use it like in C#. You need to specify the class name and call the method. Just to explain, I have the following C# classes on a project.
namespace ClassLibrary1
{
    public class Foo
    {
        public void NormalMethod()
        {
        }
    }
}

namespace ClassLibrary1
{
    public static class FooExtensions
    {
        public static void ExtensionMethod(this Foo foo)
        {
        }
    }
}
Here is how I used it in C++/CLI.
C++
using namespace System;
using namespace ClassLibrary1;

int main(array<System::String ^> ^args)
{
	Foo^ f = gcnew Foo;
	f->NormalMethod(); // Extension method will not be available to call like this
	FooExtensions::ExtensionMethod(f); // Calling extension method by specifying the class name
    return 0;
}
C++ doesn't require extension methods. It supports free functions and that is much superior than extension methods. IMO, Extension method is introduced to give something similar to C++'s free functions.

Smile | :)

Best wishes,
Navaneeth

GeneralRe: Extension Methods feature over mixed solution (managed c++ to C#) Pin
Martin#17-Dec-09 19:36
Martin#17-Dec-09 19:36 
GeneralRe: Extension Methods feature over mixed solution (managed c++ to C#) Pin
N a v a n e e t h17-Dec-09 20:51
N a v a n e e t h17-Dec-09 20:51 
GeneralRe: Extension Methods feature over mixed solution (managed c++ to C#) Pin
Martin#17-Dec-09 21:26
Martin#17-Dec-09 21:26 
GeneralRe: Extension Methods feature over mixed solution (managed c++ to C#) Pin
tonyt24-Jan-10 15:09
tonyt24-Jan-10 15:09 
GeneralRe: Extension Methods feature over mixed solution (managed c++ to C#) Pin
Martin#24-Jan-10 22:42
Martin#24-Jan-10 22:42 
Question“An unhandled exception of type 'System.IO.FileLoadException' occurred in Pin
vibindia16-Dec-09 15:21
vibindia16-Dec-09 15:21 
Questionmanaged c++ app refuses to run Pin
Jason Henderson16-Dec-09 8:10
Jason Henderson16-Dec-09 8:10 
AnswerRe: managed c++ app refuses to run Pin
N a v a n e e t h16-Dec-09 14:47
N a v a n e e t h16-Dec-09 14:47 
GeneralRe: managed c++ app refuses to run Pin
Jason Henderson17-Dec-09 2:52
Jason Henderson17-Dec-09 2:52 
AnswerRe: managed c++ app refuses to run Pin
teejayem17-Dec-09 4:43
teejayem17-Dec-09 4:43 
GeneralRe: managed c++ app refuses to run Pin
Jason Henderson17-Dec-09 4:59
Jason Henderson17-Dec-09 4:59 
GeneralRe: managed c++ app refuses to run Pin
YoavStein7-Feb-10 2:57
YoavStein7-Feb-10 2:57 
QuestionHow to send messages from pc to pc in LAN without turning 'Messenger' service on? Pin
Nilesh Hamane14-Dec-09 0:48
Nilesh Hamane14-Dec-09 0:48 
AnswerRe: How to send messages from pc to pc in LAN without turning 'Messenger' service on? Pin
Andreoli Carlo14-Dec-09 3:16
professionalAndreoli Carlo14-Dec-09 3:16 
AnswerRe: How to send messages from pc to pc in LAN without turning 'Messenger' service on? Pin
Richard MacCutchan16-Dec-09 9:08
mveRichard MacCutchan16-Dec-09 9:08 
GeneralRe: How to send messages from pc to pc in LAN without turning 'Messenger' service on? Pin
Nilesh Hamane16-Dec-09 22:07
Nilesh Hamane16-Dec-09 22:07 
GeneralRe: How to send messages from pc to pc in LAN without turning 'Messenger' service on? Pin
Richard MacCutchan16-Dec-09 22:22
mveRichard MacCutchan16-Dec-09 22:22 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.