Click here to Skip to main content
15,912,665 members
Please Sign up or sign in to vote.
5.00/5 (1 vote)
See more:
how to add module in c#.net? There is no option in the menu project-> add module in c#.net which we have in vb.net.
Posted
Comments
Prasad_Kulkarni 22-May-12 5:32am    
Module??
Can you please explain some more about this?
Member 8390746 22-May-12 5:34am    
Yes module
Prasad_Kulkarni 22-May-12 5:38am    
Well, this is really new for me. Hope I would get some info. Lets wait for answer.

There is nothing like modules in C#. The one thing that is close to that is a static function. So, instead of using modules, just use a class with a static function - that is my advice.
 
Share this answer
 
C# Doesn't use Modules - just classes.
Instead, right click your project and select "Add...New Item" you will get a list that looks pretty much as you expect.

Incidentally, if you select "Add...Module" in VB, you get the same list as "Add...New Item" anyway...
 
Share this answer
 
I think what you mean by module is actually a code file.. In C# we have a feature called code file.. Just click Add New Item you will see a something called "Code File" towards the end. That is something like a module in vb.net.. you could put your utility classes there..
 
Share this answer
 

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