|
-
Aug 1st, 2006, 04:40 AM
#1
Thread Starter
Addicted Member
*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.
Last edited by A.P.Gumby; Aug 1st, 2006 at 05:15 AM.
Reason: Resolved
Using Visual Studio 2008.
I am not young enough to know everything - Oscar Wilde
-
Aug 1st, 2006, 05:01 AM
#2
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);
-
Aug 1st, 2006, 05:14 AM
#3
Thread Starter
Addicted Member
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|