🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: borland.public.csharpbuilder.language.csharp
4 messages
4 total messages Started by Net Sun, 15 Oct 2006 22:09
Reflection
#178
Author: Net
Date: Sun, 15 Oct 2006 22:09
20 lines
1526 bytes
Hi, I'm in the process of learning c#, but i'm getting the hang of it pretty 
fast.  The problem is documentation.  I've read up on C# reflection, and i'm 
already using it, but there are certain things which aren't stated.  For 
instance, my issue is that of class references.  How do you do such in C#. 
Like for instance, delphi:

{* class reference declaration *}
TDBObjectClass = class of TDBObject;

{*
    Method returns the remotable object for a given
   class type...the method here is a class funciton
*}
TDBObject.GetRemotableClass(aClass: TDBObjectClass):TRemotable;
begin
   .....
end;


My issue is how do i declare TDBObjectClass in C#? 
Re: Reflection
#179
Author: Joanna Carter [TeamB]
Date: Sun, 15 Oct 2006 22:28
35 lines
1970 bytes
"Net" <netmaster0000@gmail.com> a �crit dans le message de news: 
4532b184$1@newsgroups.borland.com...

| Hi, I'm in the process of learning c#, but i'm getting the hang of it 
pretty
| fast.  The problem is documentation.  I've read up on C# reflection, and 
i'm
| already using it, but there are certain things which aren't stated.  For
| instance, my issue is that of class references.  How do you do such in C#.
| Like for instance, delphi:
|
| {* class reference declaration *}
| TDBObjectClass = class of TDBObject;
|
| {*
|    Method returns the remotable object for a given
|   class type...the method here is a class funciton
| *}
| TDBObject.GetRemotableClass(aClass: TDBObjectClass):TRemotable;
| begin
|   .....
| end;
|
|
| My issue is how do i declare TDBObjectClass in C#?

Unless you write your own metaclasses, C# does not support class references 
per se. So the answer is, you can't declare class references without writing 
metaclasses yourself.

Joanna

-- 
Joanna Carter [TeamB]
Consultant Software Engineer 
Re: Reflection
#180
Author: Marc Rohloff TeamB
Date: Mon, 16 Oct 2006 11:45
12 lines
1504 bytes
On Sun, 15 Oct 2006 18:09:15 -0400, Net wrote:

> TDBObject.GetRemotableClass(aClass: TDBObjectClass):TRemotable;

> My issue is how do i declare TDBObjectClass in C#?

The nearest thing available is to use the System.Type class and create
instances using reflection (Activator.CreateInstance)

-- 
Marc Rohloff [TeamB]
marc rohloff -at- myrealbox -dot- com
Re: Reflection
#181
Author: Francois PIETTE [ICS - MidWare]
Date: Tue, 17 Oct 2006 16:37
33 lines
2057 bytes
If you contact me by email, I have some C# source code to share. This code 
show how to handle metaclass with C#.

-- 
francois.piette@overbyte.be
The author for the freeware multi-tier middleware MidWare
The author of the freeware Internet Component Suite (ICS)
http://www.overbyte.be


"Net" <netmaster0000@gmail.com> a �crit dans le message de news: 
4532b184$1@newsgroups.borland.com...
> Hi, I'm in the process of learning c#, but i'm getting the hang of it 
> pretty fast.  The problem is documentation.  I've read up on C# 
> reflection, and i'm already using it, but there are certain things which 
> aren't stated.  For instance, my issue is that of class references.  How 
> do you do such in C#. Like for instance, delphi:
>
> {* class reference declaration *}
> TDBObjectClass = class of TDBObject;
>
> {*
>    Method returns the remotable object for a given
>   class type...the method here is a class funciton
> *}
> TDBObject.GetRemotableClass(aClass: TDBObjectClass):TRemotable;
> begin
>   .....
> end;
>
>
> My issue is how do i declare TDBObjectClass in C#?
> 
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads