Powered by Blogger.

Monday, September 23, 2013

Create dll in window based application in vb.net

In this post we will discuss how we can create a dll in windows bases application in vb.Net. Also you can check out my previous posts on:

- Single stored procedure to insert update and delete in sql server 2008

- Serialization and Deserialization in Remoting in C#.Net

 - Activation Models in Remoting in C#.Net

Follow below steps:

-> First open the Visual Studio.
-> Then go to File menu
-> create new project
-> select class library
-> select visual basic
-> Then give the name of the solution as myDll
-> Then give the location like D:\myDll1
-> Then press ok.

Below is the Example:
Public Class class1
Public Str As String
Public Function Display() As String
Return "AspDotnetHelp"
End Function
Public Function Add (By Val a As integer, By Val b As integer) As integer
Return a+b
End Function
End Sub
End Class

Then go to build option.
Select build myDll.(It creates some dll files in a location like D:\myDll1\myDll\myDll\bin\Debug\myDll.dll).