Click here to Skip to main content
15,917,328 members
Home / Discussions / C#
   

C#

 
AnswerRe: Process and memory Pin
Luc Pattyn15-Aug-10 7:16
sitebuilderLuc Pattyn15-Aug-10 7:16 
QuestionReading data from HTTP Pin
Wamuti15-Aug-10 3:48
Wamuti15-Aug-10 3:48 
AnswerRe: Reading data from HTTP Pin
Nicholas Butler15-Aug-10 4:14
sitebuilderNicholas Butler15-Aug-10 4:14 
AnswerRe: Reading data from HTTP Pin
Not Active15-Aug-10 4:15
mentorNot Active15-Aug-10 4:15 
QuestionHow to customise the behaviour of a control when it is selected Pin
Dave Midgley15-Aug-10 2:54
Dave Midgley15-Aug-10 2:54 
QuestionLinq - Join Pin
treuveni15-Aug-10 2:50
treuveni15-Aug-10 2:50 
AnswerRe: Linq - Join Pin
Dan Mos15-Aug-10 3:30
Dan Mos15-Aug-10 3:30 
GeneralRe: Linq - Join Pin
treuveni15-Aug-10 4:17
treuveni15-Aug-10 4:17 
GeneralRe: Linq - Join Pin
Dan Mos15-Aug-10 4:30
Dan Mos15-Aug-10 4:30 
GeneralRe: Linq - Join Pin
treuveni18-Aug-10 5:52
treuveni18-Aug-10 5:52 
QuestionRegular Expressions [modified] Pin
moein.serpico14-Aug-10 21:39
moein.serpico14-Aug-10 21:39 
AnswerRe: Regular Expressions Pin
Luc Pattyn14-Aug-10 22:26
sitebuilderLuc Pattyn14-Aug-10 22:26 
AnswerRe: Regular Expressions Pin
PIEBALDconsult15-Aug-10 8:14
mvePIEBALDconsult15-Aug-10 8:14 
QuestionDirect access to the webCam of the machine on .net framework Pin
Yanshof14-Aug-10 20:32
Yanshof14-Aug-10 20:32 
AnswerRe: Direct access to the webCam of the machine on .net framework Pin
JF201514-Aug-10 23:08
JF201514-Aug-10 23:08 
QuestionGenerics question Pin
Pete Burkindine14-Aug-10 12:31
Pete Burkindine14-Aug-10 12:31 
GeneralRe: Generics question Pin
harold aptroot14-Aug-10 12:47
harold aptroot14-Aug-10 12:47 
GeneralRe: Generics question Pin
Pete Burkindine14-Aug-10 12:55
Pete Burkindine14-Aug-10 12:55 
GeneralRe: Generics question Pin
harold aptroot14-Aug-10 13:26
harold aptroot14-Aug-10 13:26 
GeneralRe: Generics question Pin
Pete Burkindine14-Aug-10 13:40
Pete Burkindine14-Aug-10 13:40 
GeneralRe: Generics question Pin
harold aptroot14-Aug-10 13:56
harold aptroot14-Aug-10 13:56 
Pete Burkindine wrote:
So there's no way to use a type object as a generic param?

There is one way.. through reflection. I really wouldn't recommend that.

Is there a specific reason to avoid making Parent generic? Such as static fields that must be shared across all instances of parent, not just the ones with the same generic type..

This is what you want, right? Except in a way that actually works.
C#
class Parent
{
    Dictionary<string, Child<T>> _d;

    public Parent(Type T)
    {
        _d = new Dictionary<string, Child<T>>();
    }
}


It's really not much different from this:
C#
class Parent<T>
{
    Dictionary<string, Child<T>> _d;

    public Parent()
    {
        _d = new Dictionary<string, Child<T>>();
    }
}



ps: syntax colouring appears to be broken.
GeneralRe: Generics question Pin
Pete Burkindine14-Aug-10 14:20
Pete Burkindine14-Aug-10 14:20 
GeneralRe: Generics question Pin
harold aptroot14-Aug-10 14:29
harold aptroot14-Aug-10 14:29 
GeneralRe: Generics question Pin
Pete Burkindine14-Aug-10 15:22
Pete Burkindine14-Aug-10 15:22 
GeneralRe: Generics question Pin
PIEBALDconsult14-Aug-10 15:43
mvePIEBALDconsult14-Aug-10 15:43 

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.