What are differences between function and stored procedure in .Net programming language?
The difference between function and stored procedure:
- Function returns only one value but procedure can return one or more than one value.
- Function can be used in select statements but procedure cannot be used.
- Function has only input parameters while Procedure can have an input and output parameters.
- Exceptions can be handled by try catch block in procedures but that is not possible in function.
What do you know about CTS?
CTS stands for Common Type System. It follows certain rules according to which a data type should be declared and used in the program code. CTS also describes the data types that are going to be used in the application. We can even make our own classes and functions following the rules in the CTS, it helps in calling the data type declared in one program language by other programming languages.
How can we apply themes to an ASP.NET application?
We can use the web.config file to specify the themes
<cofiguration>
<system.web>
<pages theme="windows"/>
</system.web>
</configuration>
What are the differences between system.stringbuilder and system.string?
System.string is immutable and fixed-length, whereas StringBuilder is mutable and variable length. The size of .string cannot be changed, but that of .stringbuilder can be changed.
How can you identify that the page is post back?
There is a property, named as “IsPostBack” property. You can check it to know that the page is post backed or not.
What are the different types of assemblies?
There are two types of assemblies:
- Private Assembly: It is accessible only to the application, it is installed in the installation directory of the application.
- Shared Assembly: It can be shared by multiple applications, it is installed in the GAC.
What are the basic features of OOP?
The basic features of OOP are:
Encapsulation: Creation of self-contained modules that bind together the data and the functions that access that data.
Abstraction: Handles complexity and allows the implementation of further complex logic without disclosing it to the user object.
Polymorphism: Operation performed depends upon the context at runtime to facilitate easy integration.
Inheritance: Creation of classes in a hierarchy to enable a class inherit behavior from its parent class allowing reuse of code.
What is Polymorphism?
Polymorphism refers to one interface with multiple functions. It means that the same method or property can perform different actions depending on the run-time type of the instance that invokes it.
What is the application object?
The Application object is used to share information among all users of an application. You can tie a group of ASP files that work together to perform some purpose.
What are the advantages of using session?
The advantages of using session are:
- A session stores user states and data to all over the application.
- It is very easy to implement and we can store any kind of object.
- It can store every user data separately.
- Session is secure and transparent from user because session object is stored on the server.