O'Reilly logo

C++ 2013 for C# Developers,Second Edition by Dean C. Wills

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

CHAPTER 4

image

C# to C++/CLI

This is like déjà vu all over again.

—Yogi Berra

In this chapter, I show you how to convert a basic C# application to C++/CLI. I cover more advanced conversion methods in greater detail in later chapters.

Converting a C# Application

Let me start by taking apart the elements of the C# shuffling program from Chapter 2 and detailing the necessary changes, one at a time. Rather than pedantically plodding through the code line by line, I’ll draw representative samples from the code and present the finished product.

The code from Chapter 2 follows, with line numbers inserted, just so you don’t have to flip back and forth: ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required