Link to home
Start Free TrialLog in
Avatar of matt_cowdell
matt_cowdell

asked on

How do I create public variables/functions in C#? + Other basic questions

I am new to C Sharp .Net and I have a few questions.

I am moving on from VB.Net, and I've noticed a lot of differences.

How am I meant to create public variables, procedures and functions?

In VB.Net I could create a module with a procedure/function in it and call that procedure/function from anywhere in my program. How is this done in C#?

Also, in VB.Net I could go into code, i.e. Form_Open and click the combo box in the top right of Visual Studios 2005 and select from any of the other events like Form_Close. I have found how to add these events I think; by adding them into the designer.cs file of the form. Is this the only way?

And, can someone explain what all the difference public/static/void/etc terms mean and what the VB.Net equivalent (if any!) is?

Thanks in advance!
ASKER CERTIFIED SOLUTION
Avatar of rockiroads
rockiroads
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of matt_cowdell
matt_cowdell

ASKER

Thanks! those explanations are great!
Thanks. Explanations more help full people are moving from vb.net to c# like me