Click here to Skip to main content
15,886,873 members
Home / Discussions / .NET (Core and Framework)
   

.NET (Core and Framework)

 
AnswerRe: How to avoid .Net exe from decompilation Pin
Peace ON29-Apr-10 1:23
Peace ON29-Apr-10 1:23 
QuestionSGML parser for .NET Pin
Dimitri Witkowski27-Apr-10 8:16
Dimitri Witkowski27-Apr-10 8:16 
QuestionARC GIS Integration Query Pin
mauricemcse27-Apr-10 6:28
mauricemcse27-Apr-10 6:28 
QuestionInheritance vs Generics Pin
Stryder_126-Apr-10 5:41
Stryder_126-Apr-10 5:41 
AnswerRe: Inheritance vs Generics [modified] Pin
Not Active26-Apr-10 6:08
mentorNot Active26-Apr-10 6:08 
GeneralRe: Inheritance vs Generics Pin
harold aptroot27-Apr-10 6:34
harold aptroot27-Apr-10 6:34 
GeneralRe: Inheritance vs Generics Pin
Not Active27-Apr-10 7:12
mentorNot Active27-Apr-10 7:12 
AnswerRe: Inheritance vs Generics Pin
Zeeshan Amjad26-Apr-10 6:22
Zeeshan Amjad26-Apr-10 6:22 
Can't compare one with other. Inheritance is used in Object Oriented Programming and Generic is used in Generic Programming. One can't replace the advantage of one with other.

Personally i perfer to use Generic for utility classes such as vector, array, map, list etc and inheritance for contract. What does it means, with the help of inheritance, i want to make sure that we uses the appropriate level of classes.

Take a look at the following example

class Building
{
    // do something
}

class ResidentialBuilding : Building
{
    // do something
}

class RentedResidentialBuilding : ResidentialBuilding 
{
    // do someting
}

class ApartmentBuilding : RentedResidentialBuilding 
{
    // do something
}

class LuxaryApartmentBuilding : ApartmentBuilding 
{
    // do something
}

Now if i want to give some functionality of Apartment then i would do something like this

void ApartmentName(const ApartmentBuilding& apartment);


This way i will make contract, with the help of inheritance, that only apartment and its inherited class can be used with this function. We can't do exactly the same with Generic.

Similarly we can't do everything which generic offers with inheritance alone. The other answer already explained it.
AnswerRe: Inheritance vs Generics Pin
T M Gray26-Apr-10 11:59
T M Gray26-Apr-10 11:59 
AnswerRe: Inheritance vs Generics Pin
PIEBALDconsult27-Apr-10 13:40
mvePIEBALDconsult27-Apr-10 13:40 
QuestionVS 2010 Compiling Mixed Frameworks. Pin
gscheek26-Apr-10 2:59
gscheek26-Apr-10 2:59 
AnswerRe: VS 2010 Compiling Mixed Frameworks. Pin
Luc Pattyn26-Apr-10 3:13
sitebuilderLuc Pattyn26-Apr-10 3:13 
GeneralRe: VS 2010 Compiling Mixed Frameworks. Pin
gscheek26-Apr-10 3:16
gscheek26-Apr-10 3:16 
GeneralRe: VS 2010 Compiling Mixed Frameworks. Pin
Luc Pattyn26-Apr-10 3:47
sitebuilderLuc Pattyn26-Apr-10 3:47 
GeneralRe: VS 2010 Compiling Mixed Frameworks. Pin
Not Active26-Apr-10 4:32
mentorNot Active26-Apr-10 4:32 
AnswerRe: VS 2010 Compiling Mixed Frameworks. Pin
Abhinav S28-Apr-10 20:52
Abhinav S28-Apr-10 20:52 
GeneralRe: VS 2010 Compiling Mixed Frameworks. [modified] Pin
gscheek29-Apr-10 2:33
gscheek29-Apr-10 2:33 
GeneralRe: VS 2010 Compiling Mixed Frameworks. Pin
Abhinav S30-Apr-10 6:41
Abhinav S30-Apr-10 6:41 
GeneralRe: VS 2010 Compiling Mixed Frameworks. Pin
gscheek30-Apr-10 7:06
gscheek30-Apr-10 7:06 
NewsXAML and BAML obfuscator available [modified] Pin
chrildk26-Apr-10 2:53
chrildk26-Apr-10 2:53 
AnswerRe: XAML and BAML obfuscator available Pin
Peace ON27-Apr-10 21:24
Peace ON27-Apr-10 21:24 
GeneralRe: XAML and BAML obfuscator available Pin
chrildk28-Apr-10 1:37
chrildk28-Apr-10 1:37 
QuestionDeployment In Visual studio 2005 Pin
shek12426-Apr-10 1:46
shek12426-Apr-10 1:46 
AnswerAnother way to say urgent Pin
Not Active26-Apr-10 2:19
mentorNot Active26-Apr-10 2:19 
GeneralRe: Another way to say urgent Pin
shek12426-Apr-10 3:17
shek12426-Apr-10 3:17 

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.