Creating DLL in VB.net

  • Thread starter Thread starter cvh
  • Start date Start date
C

cvh

Hello,

How would I take this class and build a DLL from it?

Class PrClass

Public aPrNummer As Integer

Public aPrBarcode As String

Public aPrPma As Integer

Public aPrVaMaNr As Integer

Public aPrToMaNr As Integer



Sub New(ByVal Prnummer As Integer, ByVal PrBarcode As String, ByVal PrPma As
Integer, _

ByVal PrVaMaNr As Integer, ByVal PrToMaNr As Integer)

aPrNummer = Prnummer

aPrBarcode = PrBarcode

aPrPma = PrPma

aPrVaMaNr = PrVaMaNr

aPrToMaNr = PrToMaNr

End Sub



Public Overrides Function ToString() As String

Return CStr(aPrNummer) + _

";" + aPrBarcode + _

";" + CStr(aPrPma) + _

";" + CStr(aPrVaMaNr) + _

";" + CStr(aPrToMaNr) + _

";"

End Function
 
Start a new class library project instead of a windows application project.

Chris
 
Just build it like you would any other project. The dll will be in the bin
folder.

Chris
 
First, if that's all you want to do, I would recommend creating a Structure,
rather than a Class. Second, you should use the & for concatenation instead
of +. Third, instead of CStr(), you should use CType(currentObj, newType).

As for your main question, are you using Visual Studio.NET? If so, just go
to the Build menu and build your solution. If not, you'll need to use the
Visual Basic compiler (vbc.exe) at the command prompt. Type vbc /? to get a
list of all the compiler switches you can use.
 
Back
Top