This section includes 7 InterviewSolutions, each offering curated multiple-choice questions to sharpen your Current Affairs knowledge and support exam preparation. Choose a topic below to get started.
| 1. |
Difference Between Machine.config And Web.config? |
|
Answer» Machine.config->CONFIGURATION FILE for all the applications in the system. Machine.config->Configuration file for all the applications in the system. |
|
| 2. |
What Is The Difference Between Viewstate And Sessionstate? |
|
Answer» ViewState persist the values of controls of particular page in the client (browser) when POST back operation done. When user requests another page previous page data no LONGER available. SessionState persist the data of particular user in the server. This data available till user close the browser or session time completes. ViewState Relate to Controls, it means when Client send request in the form of Controls' value to server,In case any validation PROBLEM relating to Clients data then the ENTIRE data is not cleaned as it was occur is asp,it can restore the existing data in the form of hidden control and render data by server to respective controls,as a result user will not ENTER the complete information again, where as SessionState relates to individual user,it manages the user related information and maintain the session between client ans server. ViewState persist the values of controls of particular page in the client (browser) when post back operation done. When user requests another page previous page data no longer available. SessionState persist the data of particular user in the server. This data available till user close the browser or session time completes. ViewState Relate to Controls, it means when Client send request in the form of Controls' value to server,In case any validation problem relating to Clients data then the entire data is not cleaned as it was occur is asp,it can restore the existing data in the form of hidden control and render data by server to respective controls,as a result user will not enter the complete information again, where as SessionState relates to individual user,it manages the user related information and maintain the session between client ans server. |
|
| 3. |
In Which Order The Constructor Is Called For An Inherited Class? |
|
Answer» CONSTRUCTOR of PARENT CLASS is CALLED Then, Constructor of CHILD class Constructor of Parent class is called Then, Constructor of Child class |
|
| 4. |
In Which Order The Destructor Is Called For An Inherited Class? |
|
Answer» CHILD CLASS DESTRUCTOR is CALLED FIRST Child class destructor is called first |
|
| 5. |
Once I Have Developed The Com Wrapper Do I Have To Still Register The Com In Registry? |
|
Answer» Yes Yes |
|
| 6. |
When We Use Windows Api In .net Is It Managed Or Unmanaged Code? |
|
Answer» WINDOWS API in .NET is UNMANAGED CODE Windows API in .NET is unmanaged code |
|
| 7. |
What Is Com? |
|
Answer» Microsoft's COM is a technology for component SOFTWARE development. It is a binary STANDARD which is language independent. DCOM is a distributed EXTENSION of COM. Microsoft's COM is a technology for component software development. It is a binary standard which is language independent. DCOM is a distributed extension of COM. |
|
| 8. |
What Is Reference Counting In Com? |
|
Answer» Reference counting is a memory MANAGEMENT technique used to COUNT how many times an object has a pointer referring to it. The first TIME it is created, the reference count is set to one. When the last reference to the object is nulled, the reference count is set to zero and the object is deleted. Care must be exercised to prevent a context switch from changing the reference count at the time of DELETION. In the methods that follow, the syntax is shortened to keep the scope of the discussion brief and manageable. Reference counting is a memory management technique used to count how many times an object has a pointer referring to it. The first time it is created, the reference count is set to one. When the last reference to the object is nulled, the reference count is set to zero and the object is deleted. Care must be exercised to prevent a context switch from changing the reference count at the time of deletion. In the methods that follow, the syntax is shortened to keep the scope of the discussion brief and manageable. |
|
| 9. |
Can You Describe Iuknown Interface In Short? |
|
Answer» EVERY COM object supports at least one interface, the IUnknown interface. All interfaces are classes derived from the base class IUnknown. Each interface supports methods ACCESS data and perform operations transparently to the programmer. For example, IUnknown supports THREE methods, ADDREF, Release(), and QueryInterface(). pinterf->AddRef() increments the reference count. pinterf->Release() decrements the reference count, deleting the object when the reference count reaches zero. pinterf->QueryInterface( IDesired,pDesired) checks to see if the current interface (IUnknown) supports another interface, IDesired, creates an instance (via a CALL to CoCreateInstance()) of the object if the reference count is zero (the object does not yet exist), and then calls pDesired->AddRef() to increment the reference count(where pDesired is a pointer to IDesired) and returns the pointer to the caller. Every COM object supports at least one interface, the IUnknown interface. All interfaces are classes derived from the base class IUnknown. Each interface supports methods access data and perform operations transparently to the programmer. For example, IUnknown supports three methods, AddRef, Release(), and QueryInterface(). pinterf->AddRef() increments the reference count. pinterf->Release() decrements the reference count, deleting the object when the reference count reaches zero. pinterf->QueryInterface( IDesired,pDesired) checks to see if the current interface (IUnknown) supports another interface, IDesired, creates an instance (via a call to CoCreateInstance()) of the object if the reference count is zero (the object does not yet exist), and then calls pDesired->AddRef() to increment the reference count(where pDesired is a pointer to IDesired) and returns the pointer to the caller. |
|
| 10. |
What Is Clr |
|
Answer» It is the RUNTIME that converts a MSIL code into the host machine language code, which is then executed appropriately. It is the execution engine for .NET Frameworkapplications. It provides a NUMBER of services, including:
It is the runtime that converts a MSIL code into the host machine language code, which is then executed appropriately. It is the execution engine for .NET Frameworkapplications. It provides a number of services, including: |
|
| 11. |
What Is Cls |
|
Answer» It is the COLLECTION of the RULES and CONSTRAINTS that every language (that seeks to achieve .NET compatibility) must follow. It is a subsection of CTS and it specifies how it shares and EXTENDS ONE another libraries. It is the collection of the rules and constraints that every language (that seeks to achieve .NET compatibility) must follow. It is a subsection of CTS and it specifies how it shares and extends one another libraries. |
|
| 12. |
What Debugging Tools Come With The .net Sdk? |
|
Answer» 1.CorDBG - command-line debugger. To USE CorDbg, you must compile the ORIGINAL C# FILE using the /DEBUG switch. 1.CorDBG - command-line debugger. To use CorDbg, you must compile the original C# file using the /debug switch. |
|
| 13. |
What Is Jit Compiler |
|
Answer» It is a compiler which CONVERTS MS IL code to Native Code (ie.. CPU-specific code that RUNS on the same computer architecture). Just-In-Time compiler- it converts the language that you WRITE in .Net into machine language that a computer can understand. It is a compiler which converts MS IL code to Native Code (ie.. CPU-specific code that runs on the same computer architecture). Just-In-Time compiler- it converts the language that you write in .Net into machine language that a computer can understand. |
|
| 14. |
What Is Manifest? |
|
Answer» An assembly MANIFEST CONTAINS all the metadata NEEDED to specify the assembly's version requirements and security identity, and all metadata needed to define the scope of the assembly and resolve references to RESOURCES and classes. The assembly manifest can be stored in either a PE (Portable Executable) file (an .exe or .dll) with Microsoft INTERMEDIATE language (MSIL) code or in a standalone PE (Portable Executable) file that contains only assembly manifest information. An assembly manifest contains all the metadata needed to specify the assembly's version requirements and security identity, and all metadata needed to define the scope of the assembly and resolve references to resources and classes. The assembly manifest can be stored in either a PE (Portable Executable) file (an .exe or .dll) with Microsoft intermediate language (MSIL) code or in a standalone PE (Portable Executable) file that contains only assembly manifest information. |
|
| 15. |
What Are The Types Of Assembly Available |
|
Answer» 1.Private-The assembly is intended only for one application 1.Private-The assembly is intended only for one application |
|
| 16. |
What Are The Contents Of An Assembly ? |
Answer»
|
|
| 17. |
What Is Full Assembly Reference |
|
Answer» A FULL ASSEMBLY reference includes the assembly's text name, version, culture, and public key token (if the assembly has a STRONG name). A full assembly reference is required if you reference any assembly that is part of the common language runtime or any assembly located in the global assembly CACHE. A full assembly reference includes the assembly's text name, version, culture, and public key token (if the assembly has a strong name). A full assembly reference is required if you reference any assembly that is part of the common language runtime or any assembly located in the global assembly cache. |
|
| 18. |
What Is Partial Assembly Reference |
|
Answer» We can dynamically reference an assembly by providing only partial information, such as specifying only the assembly name. When you specify a partial assembly reference, the runtime looks for the assembly only in the APPLICATION directory. We can make partial REFERENCES to an assembly in your code ONE of the following ways: -> USE a method such as System.Reflection.Assembly.Load and specify only a partial reference. The runtime checks for the assembly in the application directory. -> Use the System.Reflection.Assembly.LoadWithPartialName method and specify only a partial reference. The runtime checks for the assembly in the application directory and in the global assembly cache. We can dynamically reference an assembly by providing only partial information, such as specifying only the assembly name. When you specify a partial assembly reference, the runtime looks for the assembly only in the application directory. We can make partial references to an assembly in your code one of the following ways: -> Use a method such as System.Reflection.Assembly.Load and specify only a partial reference. The runtime checks for the assembly in the application directory. -> Use the System.Reflection.Assembly.LoadWithPartialName method and specify only a partial reference. The runtime checks for the assembly in the application directory and in the global assembly cache. |
|
| 19. |
What Is An Assembly Qualified Name |
|
Answer» An ASSEMBLY qualified NAME isn't the filename of the assembly; it's the internal name of the assembly COMBINED with the assembly version, culture, and PUBLIC key, thus making it unique. (""System .Xml .Xml Document, System .Xml, Version =1.0.3300.0, Culture =neutral, PublicKey Token = b77 a5c561934 e089"") An assembly qualified name isn't the filename of the assembly; it's the internal name of the assembly combined with the assembly version, culture, and public key, thus making it unique. Example: (""System .Xml .Xml Document, System .Xml, Version =1.0.3300.0, Culture =neutral, PublicKey Token = b77 a5c561934 e089"") |
|
| 20. |
What Is An Assembly Loader? |
|
Answer» -Checks if the assembly is Strongly SIGNED. -If yes it will search in the GAC -Loader will search the policy file name in the format of Policy. Assembly MAJOR Version .Assembly Minor Version .Assembly Name Eg. MyPolicy.1.2.Assembly1 -If such a file EXISTS it will look inside of it if the version of the assembly that we are TRYING to load matches the version/versions range written in the policy file. If it does, it will TRY to load the assembly with the version specified there. If no such policy file exists, it will try to load the assembly from the GAC. -If it will fail to find it in the GAC, it will start to search in the system's search path. -Checks if the assembly is Strongly signed. -If yes it will search in the GAC -Loader will search the policy file name in the format of Policy. Assembly Major Version .Assembly Minor Version .Assembly Name Eg. MyPolicy.1.2.Assembly1 -If such a file exists it will look inside of it if the version of the assembly that we are trying to load matches the version/versions range written in the policy file. If it does, it will try to load the assembly with the version specified there. If no such policy file exists, it will try to load the assembly from the GAC. -If it will fail to find it in the GAC, it will start to search in the system's search path. |
|
| 21. |
What Is Gac? How To Put Assembly In Gac? |
|
Answer» The GLOBAL assembly cache stores assemblies specifically designated to be shared by several applications on the computer. You should share assemblies by installing them into the global assembly cache only when you need to. Assemblies deployed in the global assembly cache must have a strong name. When an assembly is added to the global assembly cache, integrity CHECKS are performed on all files that make up the assembly. The cache PERFORMS these integrity checks to ENSURE that an assembly has not been tampered with, for example, when a file has changed but the manifest does not reflect the change. Use a developer tool called the Global Assembly Cache tool (Gacutil.exe), provided by the .NET Framework SDK or Use Windows Explorer to drag assemblies into the cache. To install a strong-named assembly into the global assembly cache At the command prompt, type the following command: gacutil I In this command, assembly name is the name of the assembly to install in the global assembly cache. The global assembly cache stores assemblies specifically designated to be shared by several applications on the computer. You should share assemblies by installing them into the global assembly cache only when you need to. Assemblies deployed in the global assembly cache must have a strong name. When an assembly is added to the global assembly cache, integrity checks are performed on all files that make up the assembly. The cache performs these integrity checks to ensure that an assembly has not been tampered with, for example, when a file has changed but the manifest does not reflect the change. Use a developer tool called the Global Assembly Cache tool (Gacutil.exe), provided by the .NET Framework SDK or Use Windows Explorer to drag assemblies into the cache. To install a strong-named assembly into the global assembly cache At the command prompt, type the following command: gacutil I In this command, assembly name is the name of the assembly to install in the global assembly cache. |
|
| 22. |
What Is Namespace? |
|
Answer» It is a logical naming scheme for types in which a simple type name, such as MyType, is PRECEDED with a dot-separated hierarchical name. Such a naming scheme is completely under CONTROL of the DEVELOPER. This CONCEPT is not related to that of an ASSEMBLY. It is a logical naming scheme for types in which a simple type name, such as MyType, is preceded with a dot-separated hierarchical name. Such a naming scheme is completely under control of the developer. This concept is not related to that of an assembly. |
|
| 23. |
Types Of Serialization |
|
Answer» 1. Binary Serialization - preserves TYPE fidelity, which is USEFUL for preserving the state of an OBJECT between different invocations of an application. 1. Binary Serialization - preserves type fidelity, which is useful for preserving the state of an object between different invocations of an application. |
|
| 24. |
Can We Customize The Serialization Process? |
|
Answer» Yes. XmlSerializer supports a range of attributes that can be used to configure SERIALIZATION for a particular class. For example, a field or property can be marked with the [XmlIgnore] attribute to exclude it from serialization. Another example is the [XmlElement] attribute, which can be used to specify the XML element name to be used for a particular property or field. Serialization VIA SoapFormatter/BinaryFormatter can also be controlled to some extent by attributes. For example, the [NonSerialized] attribute is the equivalent of XmlSerializer's [XmlIgnore] attribute. Ultimate CONTROL of the serialization PROCESS can be acheived by IMPLEMENTING the the ISerializable interface on the class whose instances are to be serialized. Yes. XmlSerializer supports a range of attributes that can be used to configure serialization for a particular class. For example, a field or property can be marked with the [XmlIgnore] attribute to exclude it from serialization. Another example is the [XmlElement] attribute, which can be used to specify the XML element name to be used for a particular property or field. Serialization via SoapFormatter/BinaryFormatter can also be controlled to some extent by attributes. For example, the [NonSerialized] attribute is the equivalent of XmlSerializer's [XmlIgnore] attribute. Ultimate control of the serialization process can be acheived by implementing the the ISerializable interface on the class whose instances are to be serialized. |
|
| 25. |
What Is Difference Between Code Access And Role Based Security? |
|
Answer» Code security is the approach of using permissions and permission SETS for a given code to RUN. The admin, for example, can disable running executables off the Internet or restrict ACCESS to corporate database to only few applications. Role security most of the time involves the code running with the privileges of the CURRENT user. This way the code cannot supposedly do more harm than mess up a single user account. Neither is better. It depends on the NATURE of the application; both code-based and role-based security could be implemented to an extent. Code security is the approach of using permissions and permission sets for a given code to run. The admin, for example, can disable running executables off the Internet or restrict access to corporate database to only few applications. Role security most of the time involves the code running with the privileges of the current user. This way the code cannot supposedly do more harm than mess up a single user account. Neither is better. It depends on the nature of the application; both code-based and role-based security could be implemented to an extent. |
|
| 26. |
How To Exclude A Property From Xml Serialization? |
|
Answer» Answer : [XmlIgnore] (USE attribute on the PROPERTY) Eg: [XmlIgnore] PUBLIC STRING Name { .. } |
|
| 27. |
What Is Satellite Assembly? And Steps To Create Satellite Assembly? |
|
Answer» When you write a multilingual or multi-cultural application in .NET, and want to distribute the core application separately from the LOCALIZED modules, the localized assemblies that modify the core application are CALLED satellite assemblies. Steps to Create Satellite Assembly When you write a multilingual or multi-cultural application in .NET, and want to distribute the core application separately from the localized modules, the localized assemblies that modify the core application are called satellite assemblies. Steps to Create Satellite Assembly |
|
| 28. |
Can You Explain What Is Dcom ? |
|
Answer» DCOM differs from COM in that it allows for creating objects DISTRIBUTED across a network, a protocol for invoking that object's methods, and secures ACCESS to the object. DCOM provides a wrapper AROUND COM, hence it is a backwards compatible extension. DCOM uses REMOTE Procedural Calls (RPC) using Open Software Foundation's Distributed Computing Environment. DCOM differs from COM in that it allows for creating objects distributed across a network, a protocol for invoking that object's methods, and secures access to the object. DCOM provides a wrapper around COM, hence it is a backwards compatible extension. DCOM uses Remote Procedural Calls (RPC) using Open Software Foundation's Distributed Computing Environment. |
|
| 29. |
How Do We Create Dcom Object In Vb6? |
|
Answer» Using the CreateObject METHOD you can CREATE a DCOM object. You have to put the SERVER NAME in the registry. Using the CreateObject method you can create a DCOM object. You have to put the server name in the registry. |
|
| 30. |
What Is Equivalent For Regsvr32 Exe In .net ? |
|
Answer» Regasm Regasm |
|
| 31. |
What Is Multi-tasking ? |
|
Answer» It's a FEATURE of modern operating systems with which we can RUN multiple PROGRAMS at same time example WORD, Excel etc. It's a feature of modern operating systems with which we can run multiple programs at same time example Word, Excel etc. |
|
| 32. |
What Is Multi-threading ? |
|
Answer» Multi-threading forms subset of Multi-tasking. Instead of having to switch between PROGRAMS this feature SWITCHES between different parts of the same program. EXAMPLE you are writing in word and at the same time word is doing a spell check in background. Multi-threading forms subset of Multi-tasking. Instead of having to switch between programs this feature switches between different parts of the same program. Example you are writing in word and at the same time word is doing a spell check in background. |
|
| 33. |
What Is A Thread ? |
|
Answer» A THREAD is the basic UNIT to which the OPERATING system allocates processor TIME A thread is the basic unit to which the operating system allocates processor time |
|
| 34. |
Did Vb6 Support Multi-threading ? |
|
Answer» While VB6 SUPPORTS multiple single-threaded apartments, it does not SUPPORT a freethreading MODEL, which allows multiple THREADS to run against the same set of DATA. While VB6 supports multiple single-threaded apartments, it does not support a freethreading model, which allows multiple threads to run against the same set of data. |
|
| 35. |
Can We Have Multiple Threads In One App Domain ? |
|
Answer» One or more threads run in an AppDomain. An AppDomain is a runtime representation of a LOGICAL process WITHIN a physical process. Each AppDomain is started with a SINGLE THREAD, but can CREATE additional threads from any of its threads. One or more threads run in an AppDomain. An AppDomain is a runtime representation of a logical process within a physical process. Each AppDomain is started with a single thread, but can create additional threads from any of its threads. |
|
| 36. |
Namespace For The Thread Class? |
|
Answer» All THREADING CLASSES are DEFINED in System.Threading NAMESPACE All threading classes are defined in System.Threading namespace |
|
| 37. |
Is There Any Thread In Our .net Programs? |
|
Answer» .NET PROGRAM ALWAYS has at least two threads running one is the main program and second is the GARBAGE collector. .NET program always has at least two threads running one is the main program and second is the garbage collector. |
|
| 38. |
Different Levels Of Priority Provided By .net. |
|
Answer» i)ThreadPriority.Highest i)ThreadPriority.Highest |
|
| 39. |
What Does Addressof Operator Do In Background ? |
|
Answer» The AddressOf OPERATOR CREATES a delegate object to the BackgroundProcess METHOD. A delegate within VB.NET is a type-safe, object-oriented function pointer. After the thread has been instantiated, you begin the execution of the code by CALLING the START() method of the thread The AddressOf operator creates a delegate object to the BackgroundProcess method. A delegate within VB.NET is a type-safe, object-oriented function pointer. After the thread has been instantiated, you begin the execution of the code by calling the Start() method of the thread |
|
| 40. |
How Can You Reference Current Thread Of The Method ? |
|
Answer» "Thread.CurrentThread" refers to the CURRENT thread running in the method."CurrentThread" is a PUBLIC STATIC PROPERTY. "Thread.CurrentThread" refers to the current thread running in the method."CurrentThread" is a public static property. |
|
| 41. |
What's Thread.sleep() In Threading ? |
|
Answer» Thread's execution can be paused by calling the Thread.SLEEP METHOD. This method takes an INTEGER value that determines how LONG the thread should sleep. EXAMPLE Thread.CurrentThread.Sleep(2000). it will paused for 2 second. Thread's execution can be paused by calling the Thread.Sleep method. This method takes an integer value that determines how long the thread should sleep. Example Thread.CurrentThread.Sleep(2000). it will paused for 2 second. |
|
| 42. |
In Which Format You Can Pass The Value In The Sleep Function? |
|
Answer» In MILLISECONDS In milliseconds |
|
| 43. |
How Can We Make A Thread Sleep For Infinite Period ? |
|
Answer» You can also place a thread into the sleep STATE for an indeterminate AMOUNT of time by calling Thread.Sleep (System.Threading.Timeout.Infinite). To interrupt this sleep you can CALL the Thread.Interrupt method You can also place a thread into the sleep state for an indeterminate amount of time by calling Thread.Sleep (System.Threading.Timeout.Infinite). To interrupt this sleep you can call the Thread.Interrupt method |
|
| 44. |
What Is Boxing And Unboxing? |
|
Answer» ==Boxing ==UNBOXING ==Boxing ==UnBoxing |
|
| 45. |
What Is The Resgen.exe Tool Used For? |
|
Answer» ResGen.exe is a tool that is USED to convert RESOURCE FILES in the form of .txt or .resx files to common LANGUAGE RUNTIME binary .resources files that can be compiled into satellite assemblies. ResGen.exe is a tool that is used to convert resource files in the form of .txt or .resx files to common language runtime binary .resources files that can be compiled into satellite assemblies. |
|
| 46. |
What Is Ildasm.exe Used For? |
|
Answer» Ildasm.exe is a tool that takes a PE file CONTAINING the MSIL code as a parameter and creates a text file that CONTAINS managed code. Ildasm.exe is a tool that takes a PE file containing the MSIL code as a parameter and creates a text file that contains managed code. |
|
| 47. |
What Is Ilasm.exe Used For? |
|
Answer» Ilasm.exe is a TOOL that generates PE files from MSIL code. You can run the resulting executable to DETERMINE whether the MSIL code PERFORMS as expected. Ilasm.exe is a tool that generates PE files from MSIL code. You can run the resulting executable to determine whether the MSIL code performs as expected. |
|
| 48. |
What Are Generations And How Are They Used By The Garbage Collector? |
|
Answer» Generations are the division of objects on the managed HEAP used by the garbage collector. This mechanism allows the garbage collector to perform highly optimized garbage collection. The unreachable objects are placed in generation 0, the reachable objects are placed in generation 1, and the objects that SURVIVE the collection process are PROMOTED to higher generations Generations are the division of objects on the managed heap used by the garbage collector. This mechanism allows the garbage collector to perform highly optimized garbage collection. The unreachable objects are placed in generation 0, the reachable objects are placed in generation 1, and the objects that survive the collection process are promoted to higher generations |
|
| 49. |
What Is A Garbage Collector? |
|
Answer» A garbage collector PERFORMS PERIODIC CHECKS on the managed heap to identify objects that are no LONGER required by the program and removes them from MEMORY. A garbage collector performs periodic checks on the managed heap to identify objects that are no longer required by the program and removes them from memory. |
|
| 50. |
What Is The Caspol.exe Tool Used For? |
|
Answer» The CASPOL TOOL grants and modifies PERMISSIONS to CODE groups at the user policy, machine policy, and enterprise policy LEVELS. The caspol tool grants and modifies permissions to code groups at the user policy, machine policy, and enterprise policy levels. |
|