TechyMedia

A .NET Technology blog | .NET,C# Progamming,C# tutorials,WPF WCF|Software Engineer

NAVIGATION - SEARCH

C#- New Instance creation in a constructor Vs new in a member declaration, VB.NET

Is there any difference in creating new instance in constructor or create new instance as member declaration. initialize variable within constructor or outside constructor,which is best? Is there any performance or memory difference? These are some basic doubts many developers have.
Is there any difference in creating new instance in constructor or create new instance as member declaration. initialize variable within constructor or outside constructor,which is best? Is there any performance or memory difference? These are some basic doubts many developers have. [More]