Click here to Skip to main content
15,112,866 members
Home / Discussions / C#
   

C#

 
GeneralRe: Generics Problems Pin
Kevin Marois7-Sep-12 8:27
professionalKevin Marois7-Sep-12 8:27 
AnswerRe: Generics Problems Pin
Clifford Nelson7-Sep-12 8:42
MemberClifford Nelson7-Sep-12 8:42 
GeneralRe: Generics Problems Pin
Kevin Marois7-Sep-12 9:02
professionalKevin Marois7-Sep-12 9:02 
GeneralRe: Generics Problems Pin
Ennis Ray Lynch, Jr.7-Sep-12 9:51
MemberEnnis Ray Lynch, Jr.7-Sep-12 9:51 
GeneralRe: Generics Problems Pin
Kevin Marois7-Sep-12 9:55
professionalKevin Marois7-Sep-12 9:55 
GeneralRe: Generics Problems Pin
Ennis Ray Lynch, Jr.7-Sep-12 10:05
MemberEnnis Ray Lynch, Jr.7-Sep-12 10:05 
GeneralRe: Generics Problems Pin
Kevin Marois7-Sep-12 10:09
professionalKevin Marois7-Sep-12 10:09 
GeneralRe: Generics Problems Pin
Ennis Ray Lynch, Jr.7-Sep-12 10:21
MemberEnnis Ray Lynch, Jr.7-Sep-12 10:21 
I wouldn't use it but you can use the wrapper pattern below. It isn't elegant, but is a way to handle what you want without changing the underlying objects using interfaces, which really is probably the best solution.


public class Wrapper{
    private Object mObject;
    public string Name{
        get{
            string result = null;
            if(mObject is SomeTypeIRecognize){
                result = ((SomeTypeIRecognize)mObject).Name;
            }
            return result;
            
        }
    }

    public Wrapper(object o){mObject = o;}

}


Need custom software developed? I do custom programming based primarily on MS tools with an emphasis on C# development and consulting. I also do Android Programming as I find it a refreshing break from the MS.

"And they, since they Were not the one dead, turned to their affairs" -- Robert Frost

GeneralRe: Generics Problems Pin
Kevin Marois7-Sep-12 11:43
professionalKevin Marois7-Sep-12 11:43 
AnswerRe: Generics Problems Pin
Clifford Nelson7-Sep-12 10:31
MemberClifford Nelson7-Sep-12 10:31 
AnswerRe: Generics Problems Pin
Clifford Nelson7-Sep-12 10:09
MemberClifford Nelson7-Sep-12 10:09 
AnswerRe: Generics Problems Pin
PIEBALDconsult7-Sep-12 10:12
professionalPIEBALDconsult7-Sep-12 10:12 
AnswerRe: Generics Problems Pin
Eddy Vluggen7-Sep-12 10:46
professionalEddy Vluggen7-Sep-12 10:46 
GeneralRe: Generics Problems Pin
Kevin Marois7-Sep-12 11:44
professionalKevin Marois7-Sep-12 11:44 
GeneralRe: Generics Problems Pin
Eddy Vluggen7-Sep-12 11:54
professionalEddy Vluggen7-Sep-12 11:54 
GeneralRe: Generics Problems Pin
Kevin Marois7-Sep-12 11:56
professionalKevin Marois7-Sep-12 11:56 
GeneralRe: Generics Problems Pin
Eddy Vluggen7-Sep-12 12:09
professionalEddy Vluggen7-Sep-12 12:09 
AnswerRe: Generics Problems Pin
jschell7-Sep-12 11:39
Memberjschell7-Sep-12 11:39 
GeneralRe: Generics Problems Pin
Kevin Marois7-Sep-12 11:41
professionalKevin Marois7-Sep-12 11:41 
GeneralRe: Generics Problems Pin
jschell8-Sep-12 8:23
Memberjschell8-Sep-12 8:23 
AnswerRe: Generics Problems Pin
dbaseman7-Sep-12 22:20
Memberdbaseman7-Sep-12 22:20 
AnswerRe: Generics Problems Pin
Gerry Schmitz8-Sep-12 21:28
mveGerry Schmitz8-Sep-12 21:28 
Questionhow to change the parent of anUIElement Pin
benzarabel7-Sep-12 6:04
Memberbenzarabel7-Sep-12 6:04 
AnswerRe: how to change the parent of anUIElement Pin
Wes Aday7-Sep-12 6:55
professionalWes Aday7-Sep-12 6:55 
AnswerRe: how to change the parent of anUIElement Pin
Clifford Nelson7-Sep-12 8:25
MemberClifford Nelson7-Sep-12 8:25 

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.