![]() |
Array als Parameter einer Methode.
Moin,
ich habe ein "Problem" und zwar möchte ich ein Array als Argument für eine Methode benutzen, ohne dass ich vorher eines definieren muss, d.h so:
Code:
möchte ich es nicht, sondern ca so:
byte[] BA = {213, 10, 144, 3};
System.Net.IPAddress IPA = new System.Net.IPAddress(BA);
Code:
System.Net.IPAddress IPA = new System.Net.IPAddress({213, 10, 144, 3});
Muss ja möglich sein oder? Ich muss mich noch an die (für mich) neue Syntax gewöhnen... |
Re: Array als Parameter einer Methode.
Zitat:
Code:
greetz
System.Net.IPAddress IPA = new System.Net.IPAddress(new byte[] {213, 10, 144, 3});
Mike |
Alle Zeitangaben in WEZ +1. Es ist jetzt 22:10 Uhr. |
Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
LinkBacks Enabled by vBSEO © 2011, Crawlability, Inc.
Delphi-PRAXiS (c) 2002 - 2023 by Daniel R. Wolf, 2024-2025 by Thomas Breitkreuz