So ive got a few questions about CLI In visual studio it called CLR..
My First Question, what is the XOR Sign? (^), I know that it a bitwise operator But when im doing let's say
int ^ A = 5;
int B = 5;
Console::WriteLine(A->ToString());
Console::WriteLine(B.ToString());
What are the diffrences beetwen those 2? It's like pointers in C?
Question 2:
MyClass ^ MC1 = gcnew MyClass(); //What is the advantage of using gcnew?
MyClass MC2 = new MyClass(); //Why 'new' keyword dosent work on CLI? or maybe there is another way of using it?
Question 3:
Int32 B(int i)
{
return i;
}
Int32 ^ C(int ^ i)
{
return i;
}
What is the diffrence beetwen returnning ^ Variable and Normal Variable?
Question 4:
void StringFunc1(String ^ S)
{
Console::WriteLine(S);
}
void StringFunc2(String S)
{
Console::WriteLine(S); //Why a normal string dosent work?
}
Console::WriteLine("Hello World");
Console::WriteLine(L"Hello World");
What are the diffrences beetwen L"Hello World" and "Hello World"? What's the 'L' For? Why a normal string dosent work on 'StringFunc2'?
Question 5:
MyClass ^ MC1 = gcnew MyClass();
MyClass ^ MC2 = gcnew MyClass();
int i[] = { 1, 2, 3 };
int ii[,] = { { 1, 2, 3 }, { 4, 5, 6 } }; //How do i write dimensional array?
String s[] = { "Hey", "Dude" }; //Why string array dosent work?
MyClass MCArray[] = { MC1, MC2 }; //Why MyClass array dont work?