.NET Dev help

xrapidx

Honorary Master
Joined
Feb 16, 2007
Messages
42,188
Reaction score
4,038
Location
Cape Town
Haven't done application development in many years.

I need to write a DLL that I can reference in another app and call as follows:

retValue = MyDLL.Data1.Multipleby2(srcValue)

I currently have a Class

Public Class Data1
Public Function Multipleby2(ByVal Value As Int) As String
Return Value * 2
End Function
End Class

Now - this requires me to Declare the thing to use it.

e.g.
Dim mything As MyDLL.Data1
retValue = myDLL.Data1.Multipleby2(srcValue)

How do I fix it it so I can just go
retValue = MyDLL.Data1.Multipleby2(srcValue)
 
Go for it in c# :p

I'm OK with either, use it to manipulate data - but now I need to put that code in a single DLL
 
Declare it as static.

Edit: VB.net would be Shared, as in:

Code:
Public Shared Function Multipleby2(ByVal Value As Int) As String
 
Last edited:
Top
Sign up to the MyBroadband newsletter
X