Click here to Skip to main content
15,890,932 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have class file e.g. Crypto.vb which is written in VB.Net.
I want to use definition from this Crypto.vb into my windows form(WPF) code in C#.

I have no option i.e. build when I right click, so can't add reference of it.

Please help.
Posted
Updated 23-Jul-13 20:39pm
v5

1 solution

1) Add a VB.Net class libary project to your solution.
2) Add the Crypto.vb file to the class library project(Newly created VB.Net Project).
3) Add a reference in your Windows Forms application (C# Project) to your vb.net class library project (VB.Net Project).
4) Use the Crypto class in your Windows Forms application (C# Project).

To summarize the action -
Currently you are having solution with single C# project in it.
After change you will have two projects in your solution. One with VB.net and the other in C#.
 
Share this answer
 
v2
Comments
patil.nitin8358 22-Jul-13 5:28am    
i cant have option of build. when i right click on Crypto.vb
Prerak Patel 24-Jul-13 2:34am    
+5, updated the answer so that this user might get what you mean.
Pheonyx 22-Jul-13 5:32am    
Sorry, I don't get what you mean? Why are you trying to build an individual file?
Prerak Patel 24-Jul-13 2:35am    
No one has that option on class file. You can build project/solution - NOT THE CLASS FILES.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900