Das ist nur ein Ausschnitt aus der Klasse, die komplette ist hier:
Code:
using System;
using System.Collections.Generic;
using System.Text;
using System.Runtime.InteropServices;
namespace DotNetDLL
{
[ComVisible(true)]
public class DotNetClass
{
/// <summary>
/// Der Int Wert der Klasse
/// </summary>
private int m_ValueInt = 0;
/// <summary>
/// Der String der Klasse
/// </summary>
private readonly string m_ValueString = String.Empty;
/// <summary>
/// Das utilitiy Objekt
/// </summary>
private Utility m_Util = new Utility();
/// <summary>
/// Standardkonstruktor
/// </summary>
public DotNetClass()
{
m_ValueString = "Hallo";
m_ValueInt = 7;
m_Util = new Utility();
}
/// <summary>
/// Konstuktor 2
/// </summary>
/// <param name="m_ValueInt">Zahl</param>
/// <param name="m_ValueString">String</param>
/// <param name="m_Util">Objekt</param>
public DotNetClass(int m_ValueInt, string m_ValueString, Utility m_Util)
{
this.m_ValueInt = m_ValueInt;
this.m_ValueString = m_ValueString;
this.m_Util = m_Util;
}
/// <summary>
/// Der Int Wert der Klasse
/// </summary>
public int ValueInt
{
get { return m_ValueInt; }
set { m_ValueInt = value; }
}
/// <summary>
/// Der String der Klasse
/// </summary>
public string ValueString
{
get { return m_ValueString; }
}
public int add(int a,int b)
{
return a + b;
}
}
}
also daran kanns nicht liegen