Click here to Skip to main content
15,885,435 members
Home / Discussions / C#
   

C#

 
GeneralRe: What are your suggestions ? Pin
Mohammad Dayyan5-Jul-08 16:21
Mohammad Dayyan5-Jul-08 16:21 
GeneralRe: What are your suggestions ? Pin
Christian Graus5-Jul-08 16:22
protectorChristian Graus5-Jul-08 16:22 
GeneralRe: What are your suggestions ? Pin
Mohammad Dayyan5-Jul-08 16:34
Mohammad Dayyan5-Jul-08 16:34 
AnswerRe: What are your suggestions ? Pin
Luc Pattyn5-Jul-08 16:24
sitebuilderLuc Pattyn5-Jul-08 16:24 
GeneralRe: What are your suggestions ? Pin
Mohammad Dayyan5-Jul-08 16:38
Mohammad Dayyan5-Jul-08 16:38 
QuestionRichText Appending in c#.net Pin
SHINOJK5-Jul-08 7:44
SHINOJK5-Jul-08 7:44 
AnswerRe: RichText Appending in c#.net Pin
hpjchobbes5-Jul-08 8:02
hpjchobbes5-Jul-08 8:02 
QuestionCalling a generic method with a typeof expression [modified] Pin
Lutosław5-Jul-08 7:34
Lutosław5-Jul-08 7:34 
Hi everybody!

How to elegantly give the same effect as
Element last = getLastElementOfType<typeof(elem)>();

should give, but seems not to work? Without using reflection of course.
elem is an object of a type which derives from Element, but the type itself is unknown as it is passed to the method just as an Element.
I solved it by a switch statment which cases are all types deriving from Element, but it is ugly because it needs to be modified everytime a new derivative class is created.

Thanks in advance.

Greetings - Gajatko

Portable.NET is part of DotGNU, a project to build a complete Free Software replacement for .NET - a system that truly belongs to the developers.

modified on Sunday, July 6, 2008 7:03 AM

AnswerRe: Initiating a generic type from a typeof expression Pin
leppie5-Jul-08 11:54
leppie5-Jul-08 11:54 
GeneralRe: Initiating a generic type from a typeof expression Pin
Lutosław6-Jul-08 1:03
Lutosław6-Jul-08 1:03 
GeneralRe: Initiating a generic type from a typeof expression Pin
leppie6-Jul-08 3:49
leppie6-Jul-08 3:49 
GeneralRe: Initiating a generic type from a typeof expression Pin
Lutosław6-Jul-08 8:04
Lutosław6-Jul-08 8:04 
GeneralRe: Initiating a generic type from a typeof expression Pin
leppie6-Jul-08 8:25
leppie6-Jul-08 8:25 
QuestionRSA key exchange Pin
nyjcr5-Jul-08 7:04
nyjcr5-Jul-08 7:04 
QuestionOverriding custom contol OnPaint Pin
hpjchobbes5-Jul-08 6:54
hpjchobbes5-Jul-08 6:54 
AnswerRe: Overriding custom contol OnPaint Pin
Lutosław5-Jul-08 10:14
Lutosław5-Jul-08 10:14 
QuestionMDI Parent and Child Pin
benjamin yap5-Jul-08 5:27
benjamin yap5-Jul-08 5:27 
AnswerRe: MDI Parent and Child Pin
hpjchobbes5-Jul-08 8:04
hpjchobbes5-Jul-08 8:04 
GeneralRe: MDI Parent and Child [modified] Pin
benjamin yap6-Jul-08 0:08
benjamin yap6-Jul-08 0:08 
GeneralRe: MDI Parent and Child Pin
DaveyM696-Jul-08 1:33
professionalDaveyM696-Jul-08 1:33 
GeneralRe: MDI Parent and Child [modified] Pin
benjamin yap6-Jul-08 1:38
benjamin yap6-Jul-08 1:38 
GeneralRe: MDI Parent and Child Pin
DaveyM696-Jul-08 1:59
professionalDaveyM696-Jul-08 1:59 
GeneralRe: MDI Parent and Child Pin
benjamin yap6-Jul-08 2:07
benjamin yap6-Jul-08 2:07 
GeneralRe: MDI Parent and Child Pin
DaveyM696-Jul-08 2:18
professionalDaveyM696-Jul-08 2:18 
GeneralRe: MDI Parent and Child [modified] Pin
DaveyM696-Jul-08 4:16
professionalDaveyM696-Jul-08 4:16 

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.