![]() |
Re: [C#] .NET Assembly DLL nutzen
package müsste das sein, jo, ist im Prinzip verwandt mit den Namespaces, ich nehme an, dass ikvm das auf .NET-Namespaces mappt.
Wenn
Code:
geht, fress ich meinen nichtvorhandenen Hut :mrgreen:
using -;
|
Re: [C#] .NET Assembly DLL nutzen
OK. Also
Code:
geht nicht:
using -;
Zitat:
Code:
private void Form1_Load(object sender, EventArgs e)
{ HelloWorld hw; } Zitat:
|
Re: [C#] .NET Assembly DLL nutzen
Gelöst. Wen ich ein Java Package benutze geht es. Das package entspricht dann dem NameSpace:
Code:
Und in C#:
package myHelloWorld;
public class MainClass { public static void main(String[] argv) throws Exception { System.out.print("Hello, world"); } // einfache Interger Rückgabe public int intTest() { return 42; } // Integer Rückgabe mit Integer Parameterübergabe public int intTest2(int Value) { return Value * 2; } // einfache String Rückgabe public String strTest() { return "Hello, world"; } // String Rückgabe mit String Parameterübergabe public String strTest2(String s) { return s + "world"; } }
Code:
Besten Dank für die Hilfe.
using myHelloWorld;
namespace HelloWorldJava { public partial class Form1 : Form { public Form1() { InitializeComponent(); } private void Form1_Load(object sender, EventArgs e) { MainClass mc; mc = new MainClass(); Int32 i = mc.intTest(); MessageBox.Show(i.ToString()); } } } |
Alle Zeitangaben in WEZ +1. Es ist jetzt 07:34 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