130
96.4
Mar 20, 2010
Lazy loading is just a fancy name given to the process of intializing a class when it's actually needed. You might already be doing it.
For example suppose you are maintaining a collection of orders on the form and it's a class level variable, which you will fill thought out the life time of the form.
Since you know that you are going to use this collection you may say while declaring at form level
private List<orders> myOrders = new List<orders>();
or you may choose to lazy load it
private List<orders> myOrders;
and then in you form when you add the first item you do this
if ( myOrders == null)
myOrders = new List<orders>();
myOrders.add (firstOrder);