// Konkatenationsoperator.cpp: Hauptprojektdatei.

#include "stdafx.h"

using namespace System;

String^ operator +(Object^ a, String ^ b) 
{
   Console::WriteLine("Konkatenation");
   return String::Concat(a->ToString(), b);
}

String^ operator +(String^ a, String^ b) 
{
   Console::WriteLine("Konkatenation");
   return String::Concat(a, b);
}

String^ operator +(String^ a, Object^ b) 
{
   Console::WriteLine("Konkatenation");
   return String::Concat(a, b->ToString());
}




int main(array<System::String ^> ^args)
{
   
   String^ name = "P. Rothaar";
   int alter = 64;
   Console::WriteLine("Hallo " + name);
   Console::WriteLine(name + " ist " + alter + " Jahre alt.");

   Console::ReadLine();
   return 0;
}
