Interface when instantiating new class object

Posts   
 
    
G.I.
User
Posts: 172
Joined: 09-Jun-2005
# Posted on: 21-Jun-2007 09:06:11   

Hi,

there is something that is used, that I am not familiar with, and that is using an interface when instantiating a class. I tried to find other posts on this forum regarding this topic, but I could'nt find anything ...

So for example:

Using an interface: ISortExpression sorter = new SortExpression();

Normal (what I am used to): SortExpression sorter = new SortExpression();

These two objects are different ... what is the point of using an interface here and why should it be different? What is the use of the first line ...

Hard to exactly tell you want I want to know ... but hope I made my question clear ...

Walaa avatar
Walaa
Support Team
Posts: 14995
Joined: 21-Aug-2005
# Posted on: 21-Jun-2007 09:08:52   

As far as LLBLGen Pro code is concerned, it won't make a difference.