In C#, we do:
Console.WriteLine("C#");
In C++/CLI we use this syntax to use console object.
Console::WriteLine("C++ CLI");
We are using a .NET object Console
in both places so why do we access its member function WriteLine()
with dot(.) in C# project but with two colons in C++/CLI project?
From a book on C++/CLI, it says Console
is a class in System
namespace so why the :: operator? Is it a different consol
e class all together? Is the system
namespace also different from the one in C#? if so why they named it the same?