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

Managed C++/CLI

 
AnswerRe: How to use C DLL in C++/CLI Pin
Luc Pattyn2-Dec-10 1:00
sitebuilderLuc Pattyn2-Dec-10 1:00 
Questionconversion Pin
rajniyadav1a1-Dec-10 19:09
rajniyadav1a1-Dec-10 19:09 
AnswerRe: conversion Pin
Ajay Vijayvargiya1-Dec-10 21:12
Ajay Vijayvargiya1-Dec-10 21:12 
Questionpythonqt scriptint & orting to lower version Pin
appollosputnik25-Nov-10 16:41
appollosputnik25-Nov-10 16:41 
AnswerRe: pythonqt scriptint & orting to lower version Pin
Richard MacCutchan25-Nov-10 22:09
mveRichard MacCutchan25-Nov-10 22:09 
QuestionDelegates in Managed C++ Pin
ptr_Electron24-Nov-10 3:06
ptr_Electron24-Nov-10 3:06 
AnswerRe: Delegates in Managed C++ Pin
Dave Doknjas24-Nov-10 11:34
Dave Doknjas24-Nov-10 11:34 
GeneralRe: Delegates in Managed C++ [modified] Pin
ptr_Electron24-Nov-10 17:00
ptr_Electron24-Nov-10 17:00 
Thanks a lot it worked. Smile | :)

Basically I need an advice. I am woking in dot net managed C++ . I had a very large switch statement with about 50 cases
now I am refactoring the switch case. putting each case in a function and using a delagate as callback and

main ()
{
	switch (ivar)
	{
		case 1:
		{
		 //somecode 1;
		break;
		}
		case 1:
		{
		 //somecode 2;
		break;
		}

		so on

		case 50:
		{
		 //somecode 50;
		break
		}
	}
}

And now I am writing function

void somecode1(int a, int b)
{
	somecode 1;
}
void somecode2(int a, int b)
{
	somecode 2;
}
void somecode3(int a, int b)
{
	somecode 50;
}

      static void Parse(int iType)
        {
            FunList entry  = m_FunList[iType];
            entry.m_Callback.Invoke();
        }

        static void Main(string[] args)
        {
            Init();
            //i=dynamic from 1 to 50  
            i=7 
            Parse(i);
        }
        static void Init()
        {
           //Inilize the FunList
           //set paramenters and function as properties
        }


Can you please correct me if I am doing some thing not correct?
Is there any pattern that suits better?

Thanks

modified on Wednesday, November 24, 2010 11:21 PM

QuestionI nead to pass an Interface from the C++ wrapper into a C# class Pin
Ole Morten Heien22-Nov-10 12:03
Ole Morten Heien22-Nov-10 12:03 
AnswerRe: I nead to pass an Interface from the C++ wrapper into a C# class Pin
Radhakrishnan G.14-Dec-10 19:52
Radhakrishnan G.14-Dec-10 19:52 
GeneralRe: I nead to pass an Interface from the C++ wrapper into a C# class Pin
Ole Morten Heien14-Dec-10 23:34
Ole Morten Heien14-Dec-10 23:34 
GeneralRe: I nead to pass an Interface from the C++ wrapper into a C# class Pin
Radhakrishnan G.17-Dec-10 2:31
Radhakrishnan G.17-Dec-10 2:31 
GeneralRe: I nead to pass an Interface from the C++ wrapper into a C# class Pin
Philippe Mori10-Mar-11 15:40
Philippe Mori10-Mar-11 15:40 
GeneralRe: I nead to pass an Interface from the C++ wrapper into a C# class Pin
Ole Morten Heien10-Mar-11 21:21
Ole Morten Heien10-Mar-11 21:21 
GeneralRe: I nead to pass an Interface from the C++ wrapper into a C# class Pin
Philippe Mori11-Mar-11 2:47
Philippe Mori11-Mar-11 2:47 
GeneralRe: I nead to pass an Interface from the C++ wrapper into a C# class Pin
Ole Morten Heien11-Mar-11 2:48
Ole Morten Heien11-Mar-11 2:48 
QuestionHow to Get Function argument names in mangle data? Pin
mathivanaan21-Nov-10 21:18
mathivanaan21-Nov-10 21:18 
AnswerRe: How to Get Function argument names in mangle data? Crosspost Pin
Richard MacCutchan21-Nov-10 22:21
mveRichard MacCutchan21-Nov-10 22:21 
QuestionHow to determine an inherited managed class in C++ [modified] Pin
Juri Loosme20-Nov-10 4:12
Juri Loosme20-Nov-10 4:12 
AnswerRe: How to determine an inherited managed class in C++ Pin
Nish Nishant20-Nov-10 5:55
sitebuilderNish Nishant20-Nov-10 5:55 
GeneralRe: How to determine an inherited managed class in C++ Pin
Juri Loosme20-Nov-10 6:25
Juri Loosme20-Nov-10 6:25 
GeneralRe: How to determine an inherited managed class in C++ Pin
Nish Nishant20-Nov-10 6:35
sitebuilderNish Nishant20-Nov-10 6:35 
AnswerRe: How to determine an inherited managed class in C++ Pin
Philippe Mori10-Mar-11 15:49
Philippe Mori10-Mar-11 15:49 
QuestionError C2691: 'int __gc[]' Pin
maklein9918-Nov-10 4:09
maklein9918-Nov-10 4:09 
QuestionUsing VC6 MFC DLLs in VS2008 Pin
Radhakrishnan G.2-Nov-10 2:49
Radhakrishnan G.2-Nov-10 2:49 

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.