C# .NET - new key word
on 29-Mar-13 01:53 AM
While creating object we use new keyword. What is the puspose of this.
scenario 1 :
A obj1=new A();
What is the use of new key word. and what will happen if we do not use new key word in this.
on 29-Mar-13 08:38 AM
You must first create an instance of a non static object before you can use it. That is what "new" does. Otherwise, obj1 would be null.