Click here to Skip to main content
15,887,135 members
Home / Discussions / C#
   

C#

 
GeneralRe: Calculation Pin
arkiboys11-Sep-10 4:38
arkiboys11-Sep-10 4:38 
GeneralRe: Calculation Pin
Pete O'Hanlon11-Sep-10 4:56
mvePete O'Hanlon11-Sep-10 4:56 
GeneralRe: Calculation Pin
Luc Pattyn11-Sep-10 4:52
sitebuilderLuc Pattyn11-Sep-10 4:52 
GeneralRe: Calculation Pin
OriginalGriff11-Sep-10 5:56
mveOriginalGriff11-Sep-10 5:56 
GeneralRe: Calculation Pin
Luc Pattyn11-Sep-10 6:11
sitebuilderLuc Pattyn11-Sep-10 6:11 
QuestionCheckedListBox Pin
jojoba201110-Sep-10 20:06
jojoba201110-Sep-10 20:06 
AnswerRe: CheckedListBox Pin
Tony Richards11-Sep-10 0:56
Tony Richards11-Sep-10 0:56 
QuestionRe: Interface and Implementing Class Relationship Pin
infinateone10-Sep-10 14:37
infinateone10-Sep-10 14:37 
I have a burning question about interfaces. When I have a class that implements an interface, and I create the interface with the class like so:

//Interface dec......
Interface iSomething;

//Class that implements.....
Class ImplementsISomething : iSomething
{
}

//Creats an ImplementsISomething class as an interface.
iSomething Something = new ImplementsISomething();


And then I pass the interface to another class like so:

class AnotherClass
{
    iSomething refedSomething;

    public AnotherClass(ref iSomething passedInterface)
    {
        refedSomething = passedInterface;
    }
}

AnotherClass aClass = new AnotherClass(ref Something);


Now, when I pass the interface, does the interface act as a pointer to my base class, or every time I pass an interface to a class that uses it does that class take up the same amount of memory as creating another instance of the class would? This is mainly a question of does the interface take up the same amount of memory as an instance of the class, or is it just an address?
AnswerRe: Interface and Implementing Class Relationship Pin
PIEBALDconsult10-Sep-10 15:07
mvePIEBALDconsult10-Sep-10 15:07 
AnswerRe: Interface and Implementing Class Relationship Pin
Luc Pattyn10-Sep-10 17:11
sitebuilderLuc Pattyn10-Sep-10 17:11 
AnswerRe: Interface and Implementing Class Relationship [modified] Pin
Paul Michalik11-Sep-10 23:04
Paul Michalik11-Sep-10 23:04 
GeneralRe: Interface and Implementing Class Relationship [modified] Pin
infinateone12-Sep-10 9:01
infinateone12-Sep-10 9:01 
GeneralRe: Interface and Implementing Class Relationship Pin
Pete O'Hanlon12-Sep-10 10:16
mvePete O'Hanlon12-Sep-10 10:16 
GeneralRe: Interface and Implementing Class Relationship Pin
infinateone12-Sep-10 10:44
infinateone12-Sep-10 10:44 
AnswerRe: Interface and Implementing Class Relationship Pin
infinateone12-Sep-10 11:07
infinateone12-Sep-10 11:07 
GeneralRe: Interface and Implementing Class Relationship Pin
Paul Michalik12-Sep-10 20:30
Paul Michalik12-Sep-10 20:30 
GeneralRe: Interface and Implementing Class Relationship Pin
infinateone13-Sep-10 4:38
infinateone13-Sep-10 4:38 
GeneralRegular Expressions Pin
Bassam Abdul-Baki10-Sep-10 3:53
professionalBassam Abdul-Baki10-Sep-10 3:53 
GeneralRe: Regular Expressions Pin
Luc Pattyn10-Sep-10 3:58
sitebuilderLuc Pattyn10-Sep-10 3:58 
GeneralRe: Regular Expressions Pin
Bassam Abdul-Baki10-Sep-10 4:09
professionalBassam Abdul-Baki10-Sep-10 4:09 
GeneralRe: Regular Expressions Pin
PIEBALDconsult10-Sep-10 4:24
mvePIEBALDconsult10-Sep-10 4:24 
GeneralRe: Regular Expressions Pin
Bassam Abdul-Baki10-Sep-10 4:26
professionalBassam Abdul-Baki10-Sep-10 4:26 
GeneralRe: Regular Expressions Pin
PIEBALDconsult10-Sep-10 4:37
mvePIEBALDconsult10-Sep-10 4:37 
GeneralRe: Regular Expressions Pin
Bassam Abdul-Baki10-Sep-10 4:46
professionalBassam Abdul-Baki10-Sep-10 4:46 
GeneralRe: Regular Expressions Pin
Alan Balkany10-Sep-10 4:02
Alan Balkany10-Sep-10 4:02 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.