Re: Was ist...?



Hallo Rainer


> 1. Was ist Reflection?

Damit kann man zu Laufzeit die Metadata abfragen
(Metadata beschreiben die Datentypen/Klassen/... einer Assembly)



> Delphi mit Com-Objekte "rumgemacht"
> ein ActiveX Objekt zu verwenden die Typenbibliothek
> importieren. Dadurch habe ich alle Funktionen des Com-Objekts erhalten.
> Ist Reflection das gleiche wie der beschriebene Vorgang?

ja, die COM-Typenbibliothek könnte man grob mit den
..NET Metadata vergleichen.
Nur geht das .NET Konzept viel weiter.



> 2. Häufiger taucht der Begriff Marshal auf. Was ist das?


konkret etwa beim Übergang von managed in unmanaged Code
(oder umgekehrt):
'marshalling' bezeichnet die Umsetzung/Umwandlung von Daten,
so dass die 'andere Seite' (managed|unmanaged) damit klarkommt.

Beispiel:
Direkt mit einem .NET-String kann classic C++ Code oft nichts anfangen.
Daher muss (zB Bei PInvoke)
der .NET-String in eine in C++ übliche Form umgewandelt werden.






--
Thomas Scheidegger - MVP .NET - 'NETMaster'
http://www.cetus-links.org/oo_dotnet.html - http://dnetmaster.net/


.



Relevant Pages

  • Re: Reflection - When to use?
    ... | If I am the sole author of an application, I already know the metadata ... translates those objects into SQL commands. ... I write a storage mechanism with methods like this: ... reflection is not always necessary for these kind of tasks as the ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Reflection....
    ... > Can somebody point me to an explanation of what Reflection is? ... each class has metadata that describes the ... So that is the physical representation of the metadata. ... about the *called* type is added to the assembly of the calling type ...
    (microsoft.public.dotnet.general)
  • Re: get name of variable as string?
    ... Reflection by calling the Type.GetFieldsmethod. ... because their names are not compiled into the assembly's metadata. ... Well, it's just for debugging, so I may want to go there. ...
    (microsoft.public.dotnet.languages.csharp)
  • Re: Strong Names and LGPL
    ... metadata in the runtime; it is possible using them to write a tool that does ... in Whidbey there is probably going to be (or may be already in the Beta, ... so it should be possible to use the combination of Reflection ... and Reflection Emit to roundtrip an assembly and sign it then. ...
    (microsoft.public.dotnet.security)
  • Re: Meta-data on assemblies for CF...
    ... In the 1.1 version of the .NET Framework, custom attributes in the ... assembly and other metadata are not available via reflection. ... PEFile using the unmanaged MetaData API. ...
    (microsoft.public.dotnet.framework.compactframework)