define user defined namespaces and write procedures in vb. net
Answers
User defined namespaces:
(i) They allow to create a system to organize your code.
(i) Each namespace has a name, and in order to guarantee that the names of different namespaces are different, you use a unique rule for naming them.
(iii) User defined namespaces helps us to control the scope of class and method names in larger programming projects.
(iv) We access a member of namespace by using .(dot operator) also called as period operator.The members of the namespaces are variables,procedures and classes that are defined within a namespace.
(v) You can not have two classes with the same name in the same scope.We can void this by putting with the same name in a different scope.
(vi) We can define a namespace using the 'Namespace' keyword.
Procedures in vb. net:
(i) Procedure is a piece of code in a larger program.
(ii) It is a unit of code enclosed either between the sub and end sub statements or also Function of sub function statements.
(iii) if we have code that performs same task in different places, we can write the task once as a procedure and call it from different places in code.
Example:
Module Module1
Sub Main()
{
GetProcedureDemo()
Console.Read()
End Sub
Sub GetProcedureDemo()
Console.WriteLine("Welcome");
End Sub
End Module
Advantages of Procedures:
(i) Reducing duplication of code
(ii) Reduced coding time.
Hope it helps!
User is an account created after considering terms and condition which enable one to access information and can participate in any activity offered.
There are three main types of users that can be got from a namespace.
Administrator
This is the type of user with limited authority from the public use since it can cause alteration.
Limited
This a type of user that has its access to the public with limitations to making changes.
Guest User
Are used by the visitors to the system and can only view but cannot change anything and not able to access all the programmes.