Article View: borland.public.csharpbuilder.language.csharp
Article #136More about "class of" in C#
From: Borland
Date: Tue, 19 Jun 2007 04:13
Date: Tue, 19 Jun 2007 04:13
9 lines
1441 bytes
1441 bytes
Referring to that posting from December last year re "class of"... I understand the use of Activator.CreateInstance(ClassType) as a replacement for the Delphi "class of" for use in a C# abstract class factory, but how would I use that ClassType reference to call a static method (eg public static DoIt()) which has been declared in the Class class? In Delphi I would simply retrieve the "class of" reference, (eg ClassClass - class of TClass), and call the function normally - eg TClass(ClassClass).DoIt;
Technical Details
Message-ID:
<467757d6$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mailShow Full Headers
Complete Article Headers
X-Google-Thread: 1efe35,77a80b77cf3a9a3e,start X-Google-Attributes: gid1efe35,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit From: "Borland" <fallasd@sysmex.co.nz> Newsgroups: borland.public.csharpbuilder.language.csharp Subject: More about "class of" in C# Date: Tue, 19 Jun 2007 16:13:12 +1200 Lines: 11 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2900.2869 X-RFC2646: Format=Flowed; Original X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2962 NNTP-Posting-Host: 210.55.97.206 Message-ID: <467757d6$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1182226390 210.55.97.206 (18 Jun 2007 21:13:10 -0700) Path: arc1-ca.pugleaf.net!g2news1.google.com!news1.google.com!border1.nntp.dca.giganews.com!border2.nntp.dca.giganews.com!nntp.giganews.com!newspeer1.nwr.nac.net!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail X-Original-Bytes: 1296