Good Resources

http://www.andymcm.com/csharpfaq.htm

Converting Sample Code

You often find code samples in VS C# that are not also shown in VS C++.  Usually it’s really easy to convert them to C++, using Intellisense to confirm when your right.

Bacsically a ‘.’ in C# will usually be ‘->’ or ‘::’ in C++.  It’s that simple a lot of the time, so


//In C#
chart1.Series["LightBlue"].ChartType = SeriesChartType.StackedArea100;

//Converted to C++
chart1->Series["LightBlue"]->ChartType = SeriesChartType::StackedArea100;

Assuming there are no errors preceeding the bit you are working on you know when you have it right as VS Intellisense will bring up the options that follow one of which will match what’s there already.

Other than that make sure you add the ‘^’ character before the name and change ‘new’ to ‘gcnew’ when objects are created (basically anywhere ‘new’ is used).

Feel free to comment if you can add help to this page or point out issues and solutions you have found. I do not provide support on this site, if you need help with a problem head over to stack overflow.

Comments

Your email address will not be published. Required fields are marked *