Click here to Skip to main content
15,888,527 members
Home / Discussions / C#
   

C#

 
GeneralRe: Escape Characters in C# Pin
m@u24-Mar-08 7:23
m@u24-Mar-08 7:23 
GeneralRe: Escape Characters in C# Pin
Giorgi Dalakishvili24-Mar-08 7:28
mentorGiorgi Dalakishvili24-Mar-08 7:28 
GeneralRe: Escape Characters in C# Pin
Vimalsoft(Pty) Ltd25-Mar-08 1:17
professionalVimalsoft(Pty) Ltd25-Mar-08 1:17 
GeneralRe: Escape Characters in C# Pin
Giorgi Dalakishvili25-Mar-08 7:42
mentorGiorgi Dalakishvili25-Mar-08 7:42 
Questionhow to populate a textboxi in a listview control?? Pin
pyde24-Mar-08 5:41
pyde24-Mar-08 5:41 
AnswerRe: how to populate a textboxi in a listview control?? Pin
pyde26-Mar-08 8:25
pyde26-Mar-08 8:25 
Questionverify edirectory value(?) exists Pin
4r3s24-Mar-08 4:45
4r3s24-Mar-08 4:45 
QuestionCan this code be generic? Pin
SteelIXB24-Mar-08 4:26
SteelIXB24-Mar-08 4:26 
if (tn.Tag is DataNodePrimitive<string> )<br />
{<br />
    DataNodePrimitive<string> dnp = (DataNodePrimitive<string> ) tn.Tag;<br />
<br />
    // The method used is:<br />
    // public void SetData<T>(string name, T data) where T : IConvertible<br />
    // dnp.Data is:<br />
    // public T Data { get; }    ---  In this case, T is 'string'<br />
    dataEditorControl1.SetData<string>(tn.Text, dnp.Data);<br />
}


replace all occurances string with any type.

I've spent a good hour trying to work out how instead of testing if an object is DataNodePrimitive<string>, or DataNodePrimitive<int>, how it could be generalised to DataNodePrimitive<T>

Say I have an array of supported Types (Type[]), and i want to test if the tag is of DataNodePrimitive<Type[i]>, how on earth could I write code to do that?

I want my code to be as extendable as possible without having to write more.

Thanks,
Ben
AnswerRe: Can this code be generic? Pin
LongRange.Shooter24-Mar-08 5:13
LongRange.Shooter24-Mar-08 5:13 
GeneralRe: Can this code be generic? Pin
SteelIXB24-Mar-08 7:02
SteelIXB24-Mar-08 7:02 
GeneralLogical Ports.. Pin
ptr2void24-Mar-08 3:03
ptr2void24-Mar-08 3:03 
GeneralRe: Logical Ports.. Pin
ptr2void24-Mar-08 19:22
ptr2void24-Mar-08 19:22 
GeneralC: Send keystrokes Pin
Droze24-Mar-08 2:49
Droze24-Mar-08 2:49 
GeneralRe: C: Send keystrokes Pin
Rajasekharan Vengalil24-Mar-08 3:54
Rajasekharan Vengalil24-Mar-08 3:54 
GeneralRe: C: Send keystrokes Pin
Giorgi Dalakishvili24-Mar-08 7:12
mentorGiorgi Dalakishvili24-Mar-08 7:12 
QuestionFaster graphics - how? Pin
derm224-Mar-08 2:40
derm224-Mar-08 2:40 
AnswerRe: Faster graphics - how? Pin
Jordanwb24-Mar-08 6:57
Jordanwb24-Mar-08 6:57 
Questionusing in operator to filter data in Crystal Report Pin
SureshtheDude24-Mar-08 1:30
SureshtheDude24-Mar-08 1:30 
General3D graphing with c# Pin
Faysal24-Mar-08 1:16
Faysal24-Mar-08 1:16 
GeneralRe: 3D graphing with c# Pin
Giorgi Dalakishvili24-Mar-08 1:35
mentorGiorgi Dalakishvili24-Mar-08 1:35 
GeneralRe: 3D graphing with c# Pin
Faysal24-Mar-08 1:39
Faysal24-Mar-08 1:39 
GeneralRe: 3D graphing with c# Pin
Dave Kreskowiak24-Mar-08 4:28
mveDave Kreskowiak24-Mar-08 4:28 
GeneralTruncating ListView Cell Pin
Echilon24-Mar-08 1:15
Echilon24-Mar-08 1:15 
GeneralRe: Truncating ListView Cell Pin
Dave Kreskowiak24-Mar-08 4:26
mveDave Kreskowiak24-Mar-08 4:26 
GeneralRe: Truncating ListView Cell Pin
Echilon25-Mar-08 4:25
Echilon25-Mar-08 4: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.