Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

VB.NET coder -> C# coder (procedures)

Status
Not open for further replies.

Caradog

Programmer
Jun 28, 2000
73
GB
Guys, I've got hopefully a quick question here. I'm a reasonable vb.net coder but recently I have had to convert to C# for a job. Although I understand OO princeables its been awhile since I've coded in any C like language and I'm getting myself tied in knots :)

In one of my VB.Net apps, I have a Module called dbAccess which has various procedures in it I can call from any page. So if I was on a search.aspx.vb page I could type dbAccess. (which will then pop up a menu to allow me to choose one of the procedures from the module) and I would choose for example dbAccess.MyProcedure(string, int) etc.

How do I do something similar in C#? Do I need to use classes??? All I want to do is just share a commonly used set of fucntions across pages, just don't know the C# ay of doing this :) A point in the right direction would be very helpful!

- Jay
code@jay-hayman.co.uk
 
Yes, put it in a class.

You can use static methods if there's no interaction between the various methods.

Chip H.


____________________________________________________________________
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top