*RESOLVED* [2.0] Properties and methods of dll not being exposed
Hi,
After 10 years of vb and c I am making the transition to C#.
First project is to write a dll.
I am using visual studio 2005. The only tutorials that I could find were for 2003 but I basically followed the instructions as given.
I have built the dll and I am now creating a form within the solution in order to test my dll.
I have created a reference to the dll but intellisense is not showing any of the properties or methods despite the fact that the object browser shows the public and private properties of my dll.
The basic code structure of the dll is as follows :
VB Code:
using System;
using System.Collections.Generic;
using System.Text;
using System.IO.Ports;
namespace CommsDLL
{
public class Class1
{
#region Events
public delegate void OnCommsError(byte byrNumber, byte byErrorCode);
public event OnCommsError CommsError;
#endregion
#region Public Methods
public void OpenPort(byte byNumber, string strPortName, int intBaudRate)
{
//SOME CODE HERE
}
#region Private Methods
private string[] BuildTransmitString(byte[] byData, int intDataLength)
{
//INPUT - Board address and command as bytes
//OUTPUT - Transmit data string including checksum and any reqired transparency characters
//SOME CODE HERE
}
#endregion
}
}
I would appreciate any suggestions to what I am doing wrong or a link to other tutorials that might help.
Re: [2.0] Properties and methods of dll not being exposed
Once you've added a reference to the library into an application, you'll need to create an instance of the Class1 class and then you will be able to access its members, e.g.
Code:
CommsDLL.Class1 myClass1 = new CommsDLL.Class1();
myClass1.OpenPort(byNumber, strPortName, intBaudRate);
Re: [2.0] Properties and methods of dll not being exposed
Thanks for the reply,
I thought that I had tried that but I obviously got the syntax wrong :blush: :blush: :blush: