Why not do some code samples, performing it each way, and run it through
reflector to see the actual differences?

On Thu, Mar 11, 2010 at 3:38 PM, Guillermo Zafra <[email protected]>wrote:

> Hi all,
>
> Lately I have been researching about how do different methods affect
> performance, and the turn goes to constructors. What i mean is, what's the
> difference (internally) between instantiating and initializing an object
> through the New method and doing it manually?
>
> IE:
>
> Test objTest = new Test(param1, param2);
>
> vs.
>
> Test objTest = new Test();
> objTest.param1 = param1;
> objText.param2 = param2;
>
>
> I know first is more elegant but I'd like to know if the .net framework
> performs different between these two.
>
> Thanks in advance.
>
>
> Guillermo Zafra Prat
> Tlf. 600081625
> [email protected]
> www.nilart.com
> www.gzafra.com
>

Reply via email to