Last post Nov 01, 2009 10:18 PM by chetan.sarode
Oct 27, 2009 02:58 AM|vinaytedla|LINK
Iam the beginner to the asp.net.
I gone through the code of the TimeTracker.
What is the use of DataAccessHelper.cs?
What is the Difference between
DataAccess dc = (DataAccess)Activator.CreateInstance(dataAccessType); and
DataAccess dc=new DataAccess()
Please explain me in detail..
Thanks in advance..
Oct 27, 2009 03:38 AM|DeadBurger|LINK
CreateInstance uses reflection and is much slower than using new DataAccess() the benefit with reflection is you can create a dynamic instance like a user configured type, mostly used in plug-in architectures. Another benefit with Activator.CreateInstance
is that you can create an instance off non-public members too.
If you know the type when writing the code use new DataAccess(), if the type is defined runtime use reflection.
Oct 27, 2009 03:47 AM|shabirhakim1|LINK
Hi Great Man,
you can see Great Explaination of same with examples here
Oct 27, 2009 11:05 PM|chetan.sarode|LINK
Oct 28, 2009 10:54 PM|chetan.sarode|LINK
Have you got the difference
Oct 29, 2009 12:47 AM|vinaytedla|LINK
Thanks, I got the difference.
Oct 29, 2009 10:58 PM|chetan.sarode|LINK
Please mark the answer that helps you, it will help to track the status of thread
Nov 01, 2009 10:18 PM|chetan.sarode|LINK