Interview Qus

String objects are immutable?

String objects are immutable because its state can’t be modified once sting object created. Every time when we perform any operation on string object like add, copy, replace, and case conversion or pass a string object as a parameter in a method a new object will be created.
Example:
String str = "Parijat";
str.Replace("a","b");
Here Replace() method will not change data that "str" resived, instead a new string object is created to hold data "Pbrijbt" and the reference to str string object is returned by Replace() method.

How to get the assembly version?

 lbltxt.text=Assembly.GetExecutingAssembly().GetName().Version.ToString();

What is the location in System of Global Assembly Cache?

 c:\Windows\assembly


What is dll hell problem in .NET and how it will solve?

 Dll hell, is kind of conflict that come when the lack of version supportability of dll for an application.
.NET Framework gives operating system and also gives a global assembly cache. This cache is a repository for all the .net framework components that are shared globally on using machine. When .net component installed at the machine, the global assembly cache looks at its version (type), by its public key and its language information and creates a name for the component. And then the component is registered in the repository and indexed by name, so there are no differences between the different versions of same component or DLL.


 Difference between read-only, constants and static in Asp.net?

Read-only: The value will be initialized only once from the constructor of the class which is use in the program.
Constants: The value cannot change during program Execution.
Static: Value may initialized once and use this.


Difference between application and system exception.

The difference between application exception and system exception is that system exceptions are thrown by .net framework CLR and application exceptions are thrown by application by the user code.

Define thread priority levels

 Thread priority levels are five types
         0 - Zero level
         1 - Below Normal
         2 - Normal
         3 - Above Normal
         4 - Highest
By Default it is 2.

Difference between authorization and authentication.

Authorization is a system (Process) of allow to user or not allow resources to user or record.
Declaration of authorization is as follows:
<authorization>
<allow users=”Parijat, mishra”/>
<deny users=”Rishu, shyam”>
</authorization>
But when we use authorization allows the unauthorized persons at that time we will use
<deny users=”?”/>

Authentication means:
It is a process of identify the credentials of user i.e. user name, user password and create an identity of user to mention user as an authenticated.  

 What is the serialization?

 It is a process of converting (conversion process) object into a stream of bites.

What is a Partial class? Give the Example of the partial class?

Ans: Instead of defining an entire class, you can break the definition into more than one class by using partial keyword. When the application compiled, compiler will group all the partial classes together and use as a single class. Programmers can work on different parts of classes without needing to share resources (like file).

Example:
Public partial class person
{
Public void function1 ()
{
}
}
Public partial class person
{
Public void function2 ()
{
}
}


Sql Server Interview Qus:





Other Asp.net Post:

Comments

Popular posts from this blog