Click here to Skip to main content
15,898,993 members
Home / Discussions / C#
   

C#

 
Questionhyperlink to open/save image Pin
missy48-Mar-06 14:10
missy48-Mar-06 14:10 
AnswerRe: hyperlink to open/save image Pin
Guffa8-Mar-06 18:27
Guffa8-Mar-06 18:27 
GeneralRe: hyperlink to open/save image Pin
missy48-Mar-06 18:30
missy48-Mar-06 18:30 
GeneralRe: hyperlink to open/save image Pin
missy48-Mar-06 19:40
missy48-Mar-06 19:40 
AnswerRe: hyperlink to open/save image Pin
Guffa9-Mar-06 6:41
Guffa9-Mar-06 6:41 
Questionserver error in crystal report Pin
angelagke8-Mar-06 13:47
angelagke8-Mar-06 13:47 
QuestionOverloading a class? Pin
eggsovereasy8-Mar-06 10:30
eggsovereasy8-Mar-06 10:30 
AnswerRe: Overloading a class? Pin
Le centriste8-Mar-06 16:00
Le centriste8-Mar-06 16:00 
Make an abstract class with 2 static methods, and 2 classes deriving:

public abstract class LinkedList<T>
{
    //....

    public static LinkList<T> GetDoubleLinked()
    {
        return new DoubleLinked<T>();
    }

    public static LinkList<T> GetSingleLinked()
    {
        return new SingleLinked<T>();
    }

    // abstract methods needed to be overriden.
}

public class DoubleLinked<T> : LinkedList<T>
{
    // Override parent's
}

public class SingleLinked<T> : LinkedList<T>
{
    // Override parent's
}


And instantiate like this:

LinkedList<string> singleLinked = LinkedList<string>.GetSingleLinked();

LinkedList<string> doubleLinked = LinkedList<string>.GetDoubleLinked();


At this point, you have references to 2 objects that seem alike, but are not.

[Edit] I forgot to mention, make the constructors (any contructor) of the 2 derived classes, apply the internal modifier to them, so no external class can instantiate them directly, if this is what you want. [/Edit]
--------

"I say no to drugs, but they don't listen."
- Marilyn Man

-- modified at 22:10 Wednesday 8th March, 2006
AnswerRe: Overloading a class? Pin
Le centriste8-Mar-06 16:22
Le centriste8-Mar-06 16:22 
QuestionOLE in-place activation server Pin
Nikhil Dabas8-Mar-06 10:25
Nikhil Dabas8-Mar-06 10:25 
QuestionWindows Service like application for Windows CE? Pin
spAAwn8-Mar-06 10:11
spAAwn8-Mar-06 10:11 
QuestionIterating throu files Pin
Mr Marchepane8-Mar-06 8:48
Mr Marchepane8-Mar-06 8:48 
AnswerRe: Iterating throu files Pin
Kevin McFarlane8-Mar-06 10:17
Kevin McFarlane8-Mar-06 10:17 
QuestionAdd a checkbox to a openfiledialog ??? Pin
Ralf Hägenläuer8-Mar-06 8:27
Ralf Hägenläuer8-Mar-06 8:27 
AnswerRe: Add a checkbox to a openfiledialog ??? Pin
CWIZO8-Mar-06 10:36
CWIZO8-Mar-06 10:36 
GeneralRe: Add a checkbox to a openfiledialog ??? Pin
Steve Hansen9-Mar-06 3:22
Steve Hansen9-Mar-06 3:22 
GeneralRe: Add a checkbox to a openfiledialog ??? Pin
Ralf Hägenläuer9-Mar-06 10:35
Ralf Hägenläuer9-Mar-06 10:35 
QuestionObjects as DataGrid datasource Pin
nixter9998-Mar-06 7:58
nixter9998-Mar-06 7:58 
QuestionSamples of GUI Pin
Tom Wright8-Mar-06 7:01
Tom Wright8-Mar-06 7:01 
AnswerRe: Samples of GUI Pin
Judah Gabriel Himango8-Mar-06 7:11
sponsorJudah Gabriel Himango8-Mar-06 7:11 
QuestionHow to obtain drive letters without checking the diskette? Pin
Libor Tinka8-Mar-06 6:53
Libor Tinka8-Mar-06 6:53 
AnswerRe: How to obtain drive letters without checking the diskette? Pin
Tom Wright8-Mar-06 7:04
Tom Wright8-Mar-06 7:04 
GeneralRe: How to obtain drive letters without checking the diskette? Pin
Dan Neely8-Mar-06 7:19
Dan Neely8-Mar-06 7:19 
GeneralRe: How to obtain drive letters without checking the diskette? Pin
Tom Wright8-Mar-06 7:25
Tom Wright8-Mar-06 7:25 
GeneralRe: How to obtain drive letters without checking the diskette? Pin
Dan Neely8-Mar-06 7:53
Dan Neely8-Mar-06 7:53 

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.