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

C#

 
AnswerRe: app.config issue Pin
Alan N27-Feb-09 3:43
Alan N27-Feb-09 3:43 
GeneralRe: app.config issue Pin
George_George27-Feb-09 22:41
George_George27-Feb-09 22:41 
GeneralRe: app.config issue Pin
Alan N2-Mar-09 3:04
Alan N2-Mar-09 3:04 
GeneralRe: app.config issue Pin
George_George2-Mar-09 3:34
George_George2-Mar-09 3:34 
GeneralRe: app.config issue Pin
Alan N2-Mar-09 5:06
Alan N2-Mar-09 5:06 
GeneralRe: app.config issue Pin
George_George2-Mar-09 19:15
George_George2-Mar-09 19:15 
QuestionInheritance Problem in C# Pin
But_Im_a_Lady27-Feb-09 2:25
But_Im_a_Lady27-Feb-09 2:25 
AnswerRe: Inheritance Problem in C# [modified] Pin
Luc Pattyn27-Feb-09 2:39
sitebuilderLuc Pattyn27-Feb-09 2:39 
Hi,

this is how I understand it:

- you can create a special list of Days, with class SpecialDays1 : Days, but then the items have type Day
- you can create a list of SpecialDays, with class SpecialDays2 : List(SpecialDays), but then you don't inherit from Days.

However if you want a special list of special days, then you should inherit from a generic special list. You could achieve that like so (you may want to restrict T below):

public class DayList< T> : List< T> {}

public class SpecialDayList< T> : DayList< T> { ... }   // add specialization

public class Day { }

public class SpecialDay : Day { ... }           // add specialization

public class Days : DayList< Day> { }         // shorthand notation

public class SpecialListOfSpecialDays : SpecialDayList< SpecialDay>


Smile | :)

Luc Pattyn [Forum Guidelines] [My Articles]

- before you ask a question here, search CodeProject, then Google
- the quality and detail of your question reflects on the effectiveness of the help you are likely to get
- use the code block button (PRE tags) to preserve formatting when showing multi-line code snippets


modified on Friday, February 27, 2009 9:04 AM

GeneralRe: Inheritance Problem in C# Pin
PIEBALDconsult27-Feb-09 4:27
mvePIEBALDconsult27-Feb-09 4:27 
AnswerRe: Inheritance Problem in C# Pin
Curtis Schlak.27-Feb-09 4:07
Curtis Schlak.27-Feb-09 4:07 
QuestionTransform Excel to PDF in A4 format Pin
abbd27-Feb-09 2:06
abbd27-Feb-09 2:06 
QuestionConverting Bmp to monochrom BMP Pin
naeemnimi27-Feb-09 1:05
naeemnimi27-Feb-09 1:05 
AnswerRe: Converting Bmp to monochrom BMP Pin
Calin Tatar27-Feb-09 1:10
Calin Tatar27-Feb-09 1:10 
QuestionProblem in FolderBrowserDialog Pin
sudhi16427-Feb-09 0:55
sudhi16427-Feb-09 0:55 
AnswerRe: Problem in FolderBrowserDialog Pin
Calin Tatar27-Feb-09 1:07
Calin Tatar27-Feb-09 1:07 
GeneralRe: Problem in FolderBrowserDialog Pin
sudhi16427-Feb-09 1:13
sudhi16427-Feb-09 1:13 
GeneralRe: Problem in FolderBrowserDialog Pin
Calin Tatar27-Feb-09 1:29
Calin Tatar27-Feb-09 1:29 
GeneralRe: Problem in FolderBrowserDialog Pin
sudhi16427-Feb-09 2:00
sudhi16427-Feb-09 2:00 
AnswerRe: Problem in FolderBrowserDialog Pin
dan!sh 27-Feb-09 1:28
professional dan!sh 27-Feb-09 1:28 
GeneralRe: Problem in FolderBrowserDialog Pin
sudhi16427-Feb-09 2:01
sudhi16427-Feb-09 2:01 
AnswerRe: Problem in FolderBrowserDialog Pin
musefan27-Feb-09 2:04
musefan27-Feb-09 2:04 
GeneralRe: Problem in FolderBrowserDialog Pin
sudhi16427-Feb-09 2:38
sudhi16427-Feb-09 2:38 
Questionconvert word to jpeg Pin
yesu prakash27-Feb-09 0:24
yesu prakash27-Feb-09 0:24 
AnswerRe: convert word to jpeg Pin
Calin Tatar27-Feb-09 0:54
Calin Tatar27-Feb-09 0:54 
GeneralRe: convert word to jpeg Pin
yesu prakash27-Feb-09 1:29
yesu prakash27-Feb-09 1:29 

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.