如何使用C#在ASP.NET中创建类

问题描述:

我想使用类创建简单的计算.

I want to create simple calculation using class. like addition, substraction, multiplication, div etc and call it.

我们不做功课:设置它是有原因的.在这里,您可以考虑自己被告知的内容,并尝试理解它.也可以在那里帮助您的导师识别您的弱点,并将更多的注意力放在补救措施上.

自己尝试,您可能会发现它并不像您想的那么困难!
We do not do your homework: it is set for a reason. It is there so that you think about what you have been told, and try to understand it. It is also there so that your tutor can identify areas where you are weak, and focus more attention on remedial action.

Try it yourself, you may find it is not as difficult as you think!


有多种方法可以做到,
但是你试试看.
只需创建一个类文件,就可以执行该功能,并从文件后的asp.net代码中调用它.
there are diffent ways to doit,
but you try this.
just create one class file ,there you can do the functionality and call it from asp.net codebehind file.