Delphi-PRAXiS

Delphi-PRAXiS (https://www.delphipraxis.net/forum.php)
-   Sonstige Fragen zu Delphi (https://www.delphipraxis.net/19-sonstige-fragen-zu-delphi/)
-   -   Prism GetType VB.net => delphi.net (https://www.delphipraxis.net/61278-gettype-vbulletin-net-%3D-delphi-net.html)

ZeroQool007 19. Jan 2006 11:33


GetType VB.net => delphi.net
 
Hallo,

irgendwie habe ich Probleme den Typ rauszubekommen mit GetType. Ich habe eine Codevorlage aber in Visual Basic .net u nun will ich das in Delphi.net umwandeln.

Code:
Dim OrderResponse As TxmlOrdRsp
        OrderResponse = CType(XMLHelper.GetObjectFromXML(GetType(TxmlOrdRsp), ResponseDoc), TxmlOrdRsp)
Habe rumgetestet u zB. bekomme ich bei
Delphi-Quellcode:
  private
    { Private-Deklarationen }
    TestClass :TecCom.OpenMessaging.Order.TXML.V4_1.Order.TxmlOrdRsp;

.
.
.
.
.
.
.
GetType(TestClass)
als Fehlermeldung
Zitat:

zu viele Parameter

Suchfunktion u über google habe ich nichts sinnvolles dazu gefunden. thx im voraus

cu

Khabarakh 19. Jan 2006 11:44

Re: GetType VB.net => delphi.net
 
Zitat:

Zitat von ZeroQool007
Delphi-Quellcode:
GetType(TestClass)

Du rufst hier die nicht-statische Methode GetType() deines Formulars auf (=> Self.GetType()).
Delphi-Quellcode:
type := TxmlOrdRsp.GetType();

ZeroQool007 19. Jan 2006 11:59

Re: GetType VB.net => delphi.net
 
thx für die rasche Antwort. Problem ist aber immer noch, dass es bei
Delphi-Quellcode:
TxmlOrdRsp.GetType();
kein
Delphi-Quellcode:
.GetType
gibt. Habe das auch schon mal ausprobiert... =(

Khabarakh 19. Jan 2006 12:13

Re: GetType VB.net => delphi.net
 
Du hättest schon verraten können, dass TxmlOrdRsp eine Klasse und keine Instanz ist :wink: .
Delphi-Quellcode:
type := TypeOf(TxmlOrdRsp);
[edit]Gut, hier hätte ich es eigentlich sehen müssen:
Delphi-Quellcode:
TestClass :TecCom.OpenMessaging.Order.TXML.V4_1.Order.TxmlOrdRsp;

ZeroQool007 19. Jan 2006 12:24

Re: GetType VB.net => delphi.net
 
big thx...klappt =)


Alle Zeitangaben in WEZ +1. Es ist jetzt 06:42 Uhr.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024 by Thomas Breitkreuz