Interview Questions



Difference between GET and POST. Which one is more secure?
GET and POST methods are used for the data transfer between the web pages. GET mainly used for small data which is not secure because in case of GET method, the data which we are passing will be visible in the url so we can't keep the secure data which will be visible in the url. There is also limited data which can be passed in case of GET method (max 255 character).
POST is used for transferring the huge data between the pages where we can keep the secure data and can transfer it. In case of using the POST method, the data which is transferring between the pages will not be visible so it is more secure than the GET method. Also there is no limit for POST method to post the data to the next page. POST is more secure

What are Razor engines? How is it diff from ASP Engines?
A. RAZOR engine is the new concept in the MVC 3 which is mainly used to create the views in the MVC applications. It created the cshtml pages for the MVC application and cshtml pages can be generated automatically by using the Razor engine.ASP engine create the aspx pages while Razor engine creates the pages.

Difference between Functions and methods.
A. in.Net terminology, both are same. in general, we use method in .net but in scripting language we use function like JavaScript function.
Here the difference can be Function always returns a value which method may or may not. It depends upon the return type of the method. 

Difference between Abstract classes and Interface. 

. Collection of the Abstract (Incomplete) and Concrete (complete) methods is called as the Abstract class. If there is at least one abstract method in a class, the class must be abstract class.
When there is the similar behavior, we can use the abstract class.

Collection of abstract members is called as the Interface. When the behavior is not similar, we need to use the interface. All the members of the interface must be overrides in the child class

What are Delegates and Events?
A Delegate is an object, which points to another method in the application. Delegate holds, name of the method, arguments of the method (if any) and the return type of the method.
See the below points regarding the Delegate:-
· delegate keyword is sealed type in System. Multicast namespace.
· Delegate works like a function pointer in C language.
· Delegate holds the address of the function.
· Delegate hides the actual information which is written inside the method definition.
· A delegate can hold address of a single function as well as the address of multiple functions.
· There are 2 types of delegate- Single-cast delegate (hold single function) and Multicast delegate(hold multiple functions).
· Addition and subtraction are allowed for the delegates but NOT multiplication and division. It means, we can add delegates, subtract delegates etc.

Multithreading. How to implement Multithreading?
. Executing more than one process simultaneously called as multithreading. To implement the multithreading concept, we need to use the System. Threading .dll assembly and the System. Threading namespace.
To write the thread program, we need to create a class with the method. Now we can create the thread object and then pass the method by using the class object to the method.
After that we need to create the ThreadStart delegate which will call the actual method of the class.
You can go through below link for more explanation and other details regarding the implementation and the code snippet:

Comments

Popular posts from this blog

How to retain the data annotations or class during modify a table in the database

AJAX CONTROL