SlideShare a Scribd company logo
1 of 2
VB
-What is the primary advantage to defining an interface type in an application?
Solution
using interface make it possible to treat different type of object the same way.
you could define an Interface IDrivable could define method such as StartEngine, MoveFoward,
MoveBackward, TurnLeft and TurnRight.
you could then have a Car class which implement the IDrivable interface as well as Bike Class.
and in your code, you could have a loop to mixed array of Car/Bike and
obj[0] = new Car();
obj[1] = new Car();
obj[2] = new Bike();
and have a
for (int i = 0; i < obj.Count; i++)
{
((IDrivable)obj[i]).Start();
((IDrivable)obj[i]).MoveBackward();
}
This is only a simple application of what an Interface can do !
Upon that few more advantages are:-
-Knowing for certain that specific methods and/or properties are available
-Ablility to call those methods/properties without knowing anything about the derived class
Hope this help!
VB -What is the primary advantage to defining an interface type in an.docx

More Related Content

Similar to VB -What is the primary advantage to defining an interface type in an.docx

Workshop 2: JavaScript Design Patterns
Workshop 2: JavaScript Design PatternsWorkshop 2: JavaScript Design Patterns
Workshop 2: JavaScript Design PatternsVisual Engineering
 
Fields, entities, lists, oh my!
Fields, entities, lists, oh my!Fields, entities, lists, oh my!
Fields, entities, lists, oh my!Phase2
 
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]Alex Ershov
 
Making Steaks from Sacred Cows
Making Steaks from Sacred CowsMaking Steaks from Sacred Cows
Making Steaks from Sacred CowsKevlin Henney
 
Angular2 with type script
Angular2 with type scriptAngular2 with type script
Angular2 with type scriptRavi Mone
 
MVC Design Pattern in JavaScript by ADMEC Multimedia Institute
MVC Design Pattern in JavaScript by ADMEC Multimedia InstituteMVC Design Pattern in JavaScript by ADMEC Multimedia Institute
MVC Design Pattern in JavaScript by ADMEC Multimedia InstituteRavi Bhadauria
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJSYoann Gotthilf
 
01 - Intro To Using Java
01 - Intro To Using Java01 - Intro To Using Java
01 - Intro To Using Javathewhiteafrican
 
Angular.js interview questions
Angular.js interview questionsAngular.js interview questions
Angular.js interview questionscodeandyou forums
 
Batch Scripting with Drupal (Featuring the EntityFieldQuery API)
Batch Scripting with Drupal (Featuring the EntityFieldQuery API)Batch Scripting with Drupal (Featuring the EntityFieldQuery API)
Batch Scripting with Drupal (Featuring the EntityFieldQuery API)Ranel Padon
 
Swift 5.2 what are the new things that you need to know about
Swift 5.2   what are the new things that you need to know aboutSwift 5.2   what are the new things that you need to know about
Swift 5.2 what are the new things that you need to know aboutConcetto Labs
 
2010 08-26-smart-architecture
2010 08-26-smart-architecture2010 08-26-smart-architecture
2010 08-26-smart-architectureCHIP
 

Similar to VB -What is the primary advantage to defining an interface type in an.docx (20)

Workshop 2: JavaScript Design Patterns
Workshop 2: JavaScript Design PatternsWorkshop 2: JavaScript Design Patterns
Workshop 2: JavaScript Design Patterns
 
Fields, entities, lists, oh my!
Fields, entities, lists, oh my!Fields, entities, lists, oh my!
Fields, entities, lists, oh my!
 
ios basics
ios basicsios basics
ios basics
 
L9
L9L9
L9
 
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]26 top angular 8 interview questions to know in 2020   [www.full stack.cafe]
26 top angular 8 interview questions to know in 2020 [www.full stack.cafe]
 
Making Steaks from Sacred Cows
Making Steaks from Sacred CowsMaking Steaks from Sacred Cows
Making Steaks from Sacred Cows
 
Angular2 with type script
Angular2 with type scriptAngular2 with type script
Angular2 with type script
 
Service virtualization with npm modules updated
Service virtualization with npm modules updatedService virtualization with npm modules updated
Service virtualization with npm modules updated
 
MVC Design Pattern in JavaScript by ADMEC Multimedia Institute
MVC Design Pattern in JavaScript by ADMEC Multimedia InstituteMVC Design Pattern in JavaScript by ADMEC Multimedia Institute
MVC Design Pattern in JavaScript by ADMEC Multimedia Institute
 
Introduction to AngularJS
Introduction to AngularJSIntroduction to AngularJS
Introduction to AngularJS
 
Robots in Swift
Robots in SwiftRobots in Swift
Robots in Swift
 
01 - Intro To Using Java
01 - Intro To Using Java01 - Intro To Using Java
01 - Intro To Using Java
 
CV
CVCV
CV
 
Angular.js interview questions
Angular.js interview questionsAngular.js interview questions
Angular.js interview questions
 
Batch Scripting with Drupal (Featuring the EntityFieldQuery API)
Batch Scripting with Drupal (Featuring the EntityFieldQuery API)Batch Scripting with Drupal (Featuring the EntityFieldQuery API)
Batch Scripting with Drupal (Featuring the EntityFieldQuery API)
 
Swift 5.2 what are the new things that you need to know about
Swift 5.2   what are the new things that you need to know aboutSwift 5.2   what are the new things that you need to know about
Swift 5.2 what are the new things that you need to know about
 
Java getstarted
Java getstartedJava getstarted
Java getstarted
 
Insy Labs
Insy LabsInsy Labs
Insy Labs
 
Oopp Lab Work
Oopp Lab WorkOopp Lab Work
Oopp Lab Work
 
2010 08-26-smart-architecture
2010 08-26-smart-architecture2010 08-26-smart-architecture
2010 08-26-smart-architecture
 

More from mtruman1

Wages and salaries incurred in March amounted to $10-000- of which $4-.docx
Wages and salaries incurred in March amounted to $10-000- of which $4-.docxWages and salaries incurred in March amounted to $10-000- of which $4-.docx
Wages and salaries incurred in March amounted to $10-000- of which $4-.docxmtruman1
 
Visual Studio Short Answer- 1- What is the name of the tool that lets.docx
Visual Studio Short Answer- 1- What is the name of the tool that lets.docxVisual Studio Short Answer- 1- What is the name of the tool that lets.docx
Visual Studio Short Answer- 1- What is the name of the tool that lets.docxmtruman1
 
Visit two or more social media sites and review information that peopl.docx
Visit two or more social media sites and review information that peopl.docxVisit two or more social media sites and review information that peopl.docx
Visit two or more social media sites and review information that peopl.docxmtruman1
 
Visual Basic Short Answer- 1- What is the primary advantage to definin.docx
Visual Basic Short Answer- 1- What is the primary advantage to definin.docxVisual Basic Short Answer- 1- What is the primary advantage to definin.docx
Visual Basic Short Answer- 1- What is the primary advantage to definin.docxmtruman1
 
Vanadium is a transition metal that can be found in the four consecuti.docx
Vanadium is a transition metal that can be found in the four consecuti.docxVanadium is a transition metal that can be found in the four consecuti.docx
Vanadium is a transition metal that can be found in the four consecuti.docxmtruman1
 
Virtual Computing Questions-- Answer both questions in 500-600 words W.docx
Virtual Computing Questions-- Answer both questions in 500-600 words W.docxVirtual Computing Questions-- Answer both questions in 500-600 words W.docx
Virtual Computing Questions-- Answer both questions in 500-600 words W.docxmtruman1
 
VB Create a Class named file that contains the following properties- I.docx
VB Create a Class named file that contains the following properties- I.docxVB Create a Class named file that contains the following properties- I.docx
VB Create a Class named file that contains the following properties- I.docxmtruman1
 
Virtual Computing Question-- Answer the following question that listed.docx
Virtual Computing Question-- Answer the following question that listed.docxVirtual Computing Question-- Answer the following question that listed.docx
Virtual Computing Question-- Answer the following question that listed.docxmtruman1
 
Ventura Capital is a financier who specializes in capitalizing start-u (1).docx
Ventura Capital is a financier who specializes in capitalizing start-u (1).docxVentura Capital is a financier who specializes in capitalizing start-u (1).docx
Ventura Capital is a financier who specializes in capitalizing start-u (1).docxmtruman1
 
Valence electrons are not responsible for A- B- O D- The chemical reac.docx
Valence electrons are not responsible for A- B- O D- The chemical reac.docxValence electrons are not responsible for A- B- O D- The chemical reac.docx
Valence electrons are not responsible for A- B- O D- The chemical reac.docxmtruman1
 
Vertically polarized light that has an intensity of 200 W-m2 is incide.docx
Vertically polarized light that has an intensity of 200 W-m2 is incide.docxVertically polarized light that has an intensity of 200 W-m2 is incide.docx
Vertically polarized light that has an intensity of 200 W-m2 is incide.docxmtruman1
 
Week 4 - HIDS or AntiVirus Systems Research Paper The focus of the res (1).docx
Week 4 - HIDS or AntiVirus Systems Research Paper The focus of the res (1).docxWeek 4 - HIDS or AntiVirus Systems Research Paper The focus of the res (1).docx
Week 4 - HIDS or AntiVirus Systems Research Paper The focus of the res (1).docxmtruman1
 
Week 2 Discussion- I need help understanding the following question- C.docx
Week 2 Discussion- I need help understanding the following question- C.docxWeek 2 Discussion- I need help understanding the following question- C.docx
Week 2 Discussion- I need help understanding the following question- C.docxmtruman1
 
We will assume the universe is expanding at a constant rate- At t - t0.docx
We will assume the universe is expanding at a constant rate- At t - t0.docxWe will assume the universe is expanding at a constant rate- At t - t0.docx
We will assume the universe is expanding at a constant rate- At t - t0.docxmtruman1
 
We normally think of the arts as very different from technologies in s.docx
We normally think of the arts as very different from technologies in s.docxWe normally think of the arts as very different from technologies in s.docx
We normally think of the arts as very different from technologies in s.docxmtruman1
 
We discussed how the processor routes data between internal components.docx
We discussed how the processor routes data between internal components.docxWe discussed how the processor routes data between internal components.docx
We discussed how the processor routes data between internal components.docxmtruman1
 
We normally think of the arts as very different from technologies in s (1).docx
We normally think of the arts as very different from technologies in s (1).docxWe normally think of the arts as very different from technologies in s (1).docx
We normally think of the arts as very different from technologies in s (1).docxmtruman1
 
We reproduce the class Money here- in part- class Money{ public- Mone.docx
We reproduce the class Money here- in part- class Money{ public-  Mone.docxWe reproduce the class Money here- in part- class Money{ public-  Mone.docx
We reproduce the class Money here- in part- class Money{ public- Mone.docxmtruman1
 
We have two oscillators- used to measure time- One is a vertical mass-.docx
We have two oscillators- used to measure time- One is a vertical mass-.docxWe have two oscillators- used to measure time- One is a vertical mass-.docx
We have two oscillators- used to measure time- One is a vertical mass-.docxmtruman1
 
Water of constant density The solution is- Can someone show me how to.docx
Water of constant density The solution is-  Can someone show me how to.docxWater of constant density The solution is-  Can someone show me how to.docx
Water of constant density The solution is- Can someone show me how to.docxmtruman1
 

More from mtruman1 (20)

Wages and salaries incurred in March amounted to $10-000- of which $4-.docx
Wages and salaries incurred in March amounted to $10-000- of which $4-.docxWages and salaries incurred in March amounted to $10-000- of which $4-.docx
Wages and salaries incurred in March amounted to $10-000- of which $4-.docx
 
Visual Studio Short Answer- 1- What is the name of the tool that lets.docx
Visual Studio Short Answer- 1- What is the name of the tool that lets.docxVisual Studio Short Answer- 1- What is the name of the tool that lets.docx
Visual Studio Short Answer- 1- What is the name of the tool that lets.docx
 
Visit two or more social media sites and review information that peopl.docx
Visit two or more social media sites and review information that peopl.docxVisit two or more social media sites and review information that peopl.docx
Visit two or more social media sites and review information that peopl.docx
 
Visual Basic Short Answer- 1- What is the primary advantage to definin.docx
Visual Basic Short Answer- 1- What is the primary advantage to definin.docxVisual Basic Short Answer- 1- What is the primary advantage to definin.docx
Visual Basic Short Answer- 1- What is the primary advantage to definin.docx
 
Vanadium is a transition metal that can be found in the four consecuti.docx
Vanadium is a transition metal that can be found in the four consecuti.docxVanadium is a transition metal that can be found in the four consecuti.docx
Vanadium is a transition metal that can be found in the four consecuti.docx
 
Virtual Computing Questions-- Answer both questions in 500-600 words W.docx
Virtual Computing Questions-- Answer both questions in 500-600 words W.docxVirtual Computing Questions-- Answer both questions in 500-600 words W.docx
Virtual Computing Questions-- Answer both questions in 500-600 words W.docx
 
VB Create a Class named file that contains the following properties- I.docx
VB Create a Class named file that contains the following properties- I.docxVB Create a Class named file that contains the following properties- I.docx
VB Create a Class named file that contains the following properties- I.docx
 
Virtual Computing Question-- Answer the following question that listed.docx
Virtual Computing Question-- Answer the following question that listed.docxVirtual Computing Question-- Answer the following question that listed.docx
Virtual Computing Question-- Answer the following question that listed.docx
 
Ventura Capital is a financier who specializes in capitalizing start-u (1).docx
Ventura Capital is a financier who specializes in capitalizing start-u (1).docxVentura Capital is a financier who specializes in capitalizing start-u (1).docx
Ventura Capital is a financier who specializes in capitalizing start-u (1).docx
 
Valence electrons are not responsible for A- B- O D- The chemical reac.docx
Valence electrons are not responsible for A- B- O D- The chemical reac.docxValence electrons are not responsible for A- B- O D- The chemical reac.docx
Valence electrons are not responsible for A- B- O D- The chemical reac.docx
 
Vertically polarized light that has an intensity of 200 W-m2 is incide.docx
Vertically polarized light that has an intensity of 200 W-m2 is incide.docxVertically polarized light that has an intensity of 200 W-m2 is incide.docx
Vertically polarized light that has an intensity of 200 W-m2 is incide.docx
 
Week 4 - HIDS or AntiVirus Systems Research Paper The focus of the res (1).docx
Week 4 - HIDS or AntiVirus Systems Research Paper The focus of the res (1).docxWeek 4 - HIDS or AntiVirus Systems Research Paper The focus of the res (1).docx
Week 4 - HIDS or AntiVirus Systems Research Paper The focus of the res (1).docx
 
Week 2 Discussion- I need help understanding the following question- C.docx
Week 2 Discussion- I need help understanding the following question- C.docxWeek 2 Discussion- I need help understanding the following question- C.docx
Week 2 Discussion- I need help understanding the following question- C.docx
 
We will assume the universe is expanding at a constant rate- At t - t0.docx
We will assume the universe is expanding at a constant rate- At t - t0.docxWe will assume the universe is expanding at a constant rate- At t - t0.docx
We will assume the universe is expanding at a constant rate- At t - t0.docx
 
We normally think of the arts as very different from technologies in s.docx
We normally think of the arts as very different from technologies in s.docxWe normally think of the arts as very different from technologies in s.docx
We normally think of the arts as very different from technologies in s.docx
 
We discussed how the processor routes data between internal components.docx
We discussed how the processor routes data between internal components.docxWe discussed how the processor routes data between internal components.docx
We discussed how the processor routes data between internal components.docx
 
We normally think of the arts as very different from technologies in s (1).docx
We normally think of the arts as very different from technologies in s (1).docxWe normally think of the arts as very different from technologies in s (1).docx
We normally think of the arts as very different from technologies in s (1).docx
 
We reproduce the class Money here- in part- class Money{ public- Mone.docx
We reproduce the class Money here- in part- class Money{ public-  Mone.docxWe reproduce the class Money here- in part- class Money{ public-  Mone.docx
We reproduce the class Money here- in part- class Money{ public- Mone.docx
 
We have two oscillators- used to measure time- One is a vertical mass-.docx
We have two oscillators- used to measure time- One is a vertical mass-.docxWe have two oscillators- used to measure time- One is a vertical mass-.docx
We have two oscillators- used to measure time- One is a vertical mass-.docx
 
Water of constant density The solution is- Can someone show me how to.docx
Water of constant density The solution is-  Can someone show me how to.docxWater of constant density The solution is-  Can someone show me how to.docx
Water of constant density The solution is- Can someone show me how to.docx
 

Recently uploaded

Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentInMediaRes1
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersSabitha Banu
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...M56BOOKSTORE PRODUCT/SERVICE
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)eniolaolutunde
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitolTechU
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxpboyjonauth
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTiammrhaywood
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxsocialsciencegdgrohi
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxRaymartEstabillo3
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdfssuser54595a
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfMahmoud M. Sallam
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxiammrhaywood
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,Virag Sontakke
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaVirag Sontakke
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfUjwalaBharambe
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Celine George
 

Recently uploaded (20)

Meghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media ComponentMeghan Sutherland In Media Res Media Component
Meghan Sutherland In Media Res Media Component
 
DATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginnersDATA STRUCTURE AND ALGORITHM for beginners
DATA STRUCTURE AND ALGORITHM for beginners
 
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
KSHARA STURA .pptx---KSHARA KARMA THERAPY (CAUSTIC THERAPY)————IMP.OF KSHARA ...
 
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdfTataKelola dan KamSiber Kecerdasan Buatan v022.pdf
TataKelola dan KamSiber Kecerdasan Buatan v022.pdf
 
Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)Software Engineering Methodologies (overview)
Software Engineering Methodologies (overview)
 
Capitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptxCapitol Tech U Doctoral Presentation - April 2024.pptx
Capitol Tech U Doctoral Presentation - April 2024.pptx
 
Introduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptxIntroduction to AI in Higher Education_draft.pptx
Introduction to AI in Higher Education_draft.pptx
 
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPTECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
ECONOMIC CONTEXT - LONG FORM TV DRAMA - PPT
 
ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)ESSENTIAL of (CS/IT/IS) class 06 (database)
ESSENTIAL of (CS/IT/IS) class 06 (database)
 
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptxHistory Class XII Ch. 3 Kinship, Caste and Class (1).pptx
History Class XII Ch. 3 Kinship, Caste and Class (1).pptx
 
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptxEPANDING THE CONTENT OF AN OUTLINE using notes.pptx
EPANDING THE CONTENT OF AN OUTLINE using notes.pptx
 
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
18-04-UA_REPORT_MEDIALITERAСY_INDEX-DM_23-1-final-eng.pdf
 
Pharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdfPharmacognosy Flower 3. Compositae 2023.pdf
Pharmacognosy Flower 3. Compositae 2023.pdf
 
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptxECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
ECONOMIC CONTEXT - PAPER 1 Q3: NEWSPAPERS.pptx
 
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,भारत-रोम व्यापार.pptx, Indo-Roman Trade,
भारत-रोम व्यापार.pptx, Indo-Roman Trade,
 
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
Model Call Girl in Tilak Nagar Delhi reach out to us at 🔝9953056974🔝
 
Painted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of IndiaPainted Grey Ware.pptx, PGW Culture of India
Painted Grey Ware.pptx, PGW Culture of India
 
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdfFraming an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
Framing an Appropriate Research Question 6b9b26d93da94caf993c038d9efcdedb.pdf
 
OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...OS-operating systems- ch04 (Threads) ...
OS-operating systems- ch04 (Threads) ...
 
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
Incoming and Outgoing Shipments in 1 STEP Using Odoo 17
 

VB -What is the primary advantage to defining an interface type in an.docx

  • 1. VB -What is the primary advantage to defining an interface type in an application? Solution using interface make it possible to treat different type of object the same way. you could define an Interface IDrivable could define method such as StartEngine, MoveFoward, MoveBackward, TurnLeft and TurnRight. you could then have a Car class which implement the IDrivable interface as well as Bike Class. and in your code, you could have a loop to mixed array of Car/Bike and obj[0] = new Car(); obj[1] = new Car(); obj[2] = new Bike(); and have a for (int i = 0; i < obj.Count; i++) { ((IDrivable)obj[i]).Start(); ((IDrivable)obj[i]).MoveBackward(); } This is only a simple application of what an Interface can do ! Upon that few more advantages are:- -Knowing for certain that specific methods and/or properties are available -Ablility to call those methods/properties without knowing anything about the derived class Hope this help!