且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

为什么我们要在asp.net Web应用程序中声明参数

更新时间:2022-05-11 03:08:36

我们怎么可能告诉您为什么在您的代码中正在做某些事情?

等等,这是一个水晶球,当我们需要了解客户真正想要的东西时,我们会用到它.也许如果我专心致志,我可以将其重新用于此任务...
How can we possibly tell you WHY something is being done in YOUR code?

Oh wait... here''s a crystal ball that we keep handy for when we need to devine what our customers REALLY want. Maybe if I concentrate hard enough, I can repurpose it for this task...


首先,您需要在开始项目之前研究面向对象编程的核心概念.

Set和Get是属性而不是方法.属性用于将字段封装到其中.

参数是在方法或存储过程中使用的变量.
有两种类型的参数,实际参数和形式参数.
实际参数是您发送给函数的值.
正式将收集该变量的值.

如果"cmd"是它的对象,则cmd.parameters.clear()是CommadClass的方法.顾名思义,它将清除()所有参数.

我希望它能给您一点点创意,但是要深入了解,您必须从书籍,网络文章中学习它,因为Google是您的朋友.
First of all, you need to study the core concept of Object oriented programming before starting your project.

Set and Get are the properties not the methods. Properties are used to encapsulates the fields into it.

Parameters are the variable which are used within the methods or stored procedures.
there are two type of parameters, Actual and formal.
Actual parameter are the value which you send to the function.
Formal will collects the value of that variable.

cmd.parameters.clear() is the method of the CommadClass If "cmd" is the object of it. As the name suggest it will clear() all the parameters.

I hope it has given you a little Idea, but to know in depth you have to study about it from books, articles on web as google is your friend.