사용환경 : Visual Studio 2017, Windows 10 x64 C#과 C++을 Mixing해서 코딩하는 방법을 알아보자. C++ Class를 C#에서 사용하는 예제를 하나 진행해보자. C++ Class를 만든 후, 그 C++ Class를 사용하는 C++/CLI Class를 만든 다음, C#에서 C++/CLI Class를 사용하는 방식으로 진행하려고 한다. 먼저 Visual Studio에서 “Blank Solution”을 하나 만들자. Solution 이름은 “Hybrid1”으로 하자. Hybrid1 Solution에 “Windows Desktop Wizard”로 Visual C++ Project를 하나 추가한다. Project 이름은 “Native1”으로 하자. Application type..
// [Java] Thread Samplepackage package1; public class Program { public static void main(String[] args) { Thread t1 = new Thread(new A()); Thread t2 = new Thread(new B()); t1.start(); t2.start(); for (int i = 0; i < 10000; i++) { System.out.print("@"); } }} class A implements Runnable { public void run() { for (int i = 0; i < 10000; i++) { System.out.print("."); } }} class B implements Runnable {..
// C# 2.0 Style Threadusing System;using System.Threading; namespace ThreadSample{ class Program { static void Main(string[] args) { // C# 2.0 Style Thread does not use ThreadStart Thread t2 = new Thread(Work); t2.Start(); for (int count = 0; count < Repetitions; count++) { Console.Write('@'); } } static void Work() { for (int count = 0; count < Repetitions; count++) { Console.Write('.'); } } co..