Link to home
Start Free TrialLog in
Avatar of Mickeys
MickeysFlag for Sweden

asked on

Adding your own class to a .NET project

Hi

I am trying to learn C# .Net. I have created a Default.aspx file and also included a class in App_Code map.

I am wondering how I include this new class in the Default.aspx.cs?

What shall I write. I think I have tried everything.

using App_Code/MyNewClass;  ???

or what?

/M
Avatar of Dirk Haest
Dirk Haest
Flag of Belgium image

you can initiate your class very easily like:

myClassname item = new myClassname();
// do whatever function your declared on your class
int sum = item.CalcSum(100,200);


http://www.csharp-station.com/Tutorials/Lesson07.aspx
SOLUTION
Avatar of abel
abel
Flag of Netherlands 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
ASKER CERTIFIED 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
Tx, glad I could've been of help :)