Q1. What is the Difference between Dataset and Datareader?
A. Dataset is cache of records retrieve from data source.
Datareader is used to retrieve data from datasource. 1.Using Datareader we can read the data readnly,forwordonly basis. 2.Only one record in a memmory at a tme 3.Faster 4.Doesnot hold any data 5.Data can not be transfer to datasource Wher as in Dataset 1. we can read and write and allow us to navigate through the records forword and backwords. 2.Pulls the records from the datasource and saves in IIS memmory. 3.Slower 4.Holds datatables and has the information about relationship between those tbes. 5.Data can be transfer to datasource Q2.Polymorphism Polymorphism is one of the crucial features of OOP. It means "one name, multiple forms". It is also called as Overloading which means the use of same thing for different purposes. Using Polymorphism we can create as many functions we want with one function name but with different argument list. The function performs different operations based on the argument list in the function call. The exact function to be invoked will be determined by checking the type and number of arguments in the function. Q3.Inheritance A key feature of OOP is reusability. It's always time saving and useful if we can reuse something that already exists rather than trying to create the same thing again and again. Reusing the class that is tested, debugged and used many times can save us time and effort of developing and testing it again. Once a class has been written and tested, it can be used by other programs to suit the program's requirement. This is done by creating a new class from an existing class. The process of deriving a new class from an existing class is called Inheritance. The old class is called the base class and the new class is called derived class. The derived class inherits some or everything of the base class. In Visual Basic we use the Inherits keyword to inherit one class from other. Q4.Class: Class is a conceptual representation of all entities that share a common Attribute and behaviours. Q5. Object: Object is an instace of class. All objects of the class have an individual copies of the attribute. Q6.Advantage of class and Object: Ans:1) Maintenace of code by introducing modelarlty. 2).Encapsulation of internal complexity in code from end user. 3).Reuse of code across application 4).Support for a single interface to implement multiple method. Q7.Structure Ans: Using Structure we can create our own Datatype Q8.NameSpace: Ans: Namespace are naing schema that help you organize the class available in an application so that they can be easily found Q9.Access Specifiers: Ans:Public: Gives variable public access which means that there is no restriction on their accessibility Private: Gives variable private access which means that they are accessible only within their declaration content Protected: Protected access gives a variable accessibility within their own class or a class derived from that class Friend: Gives variable friend access which means that they are accessible within the program that contains their declaration Protected Friend: Gives a variable both protected and friend access Static: Makes a variable static which means that the variable will hold the value even the procedure in which they are declared ends Shared: Declares a variable that can be shared across many instances and which is not associated with a specific instance of a class or structure ReadOnly: Makes a variable only to be read and cannot be written Q10. Overriding The method in the derived class the has the same name in the base class and it changes the behaviour or functionality of the method in the base class. Q.9 Visual Basic .NET we create an abstract class by using the MustInherit keyword. An abstract class like all other classes can implement any number of members. Members of anabstract class can either be Overridable (all the inheriting classes can create their own implementation of the members) or they can have a fixed implementation that will be common to all inheriting members. Abstract classes can also specify abstract members. Like abstract classes, abstract members also provide no details regarding their implementation. Only the member type, access level, required parameters and return type are specified. To declare an abstract member we use the MustOverride keyword. Abstract members should be declared in abstract classes. Implementing Abstract Class When a class inherits from an abstract class, it must implement every abstract member defined by the abstract class. Implementation is possible by overriding the member specified in the abstract class. The following code demonstrates the declaration and implementation of an abstract class. Module Module1 Public MustInherit Class AbstractClass 'declaring an abstract class with MustInherit keyword Public MustOverride Function Add() As Integer Public MustOverride Function Mul() As Integer 'declaring two abstract members with MustOverride keyword End Class Public Class AbstractOne Inherits AbstractClass 'implementing the abstract class by inheriting Dim i As Integer = 20 Dim j As Integer = 30 'declaring two integers Public Overrides Function Add() As Integer Return i + j End Function 'implementing the add method Public Overrides Function Mul() As Integer Return i * j End Function 'implementing the mul method End Class Sub Main() Dim abs As New AbstractOne() 'creating an instance of AbstractOne WriteLine("Sum is" & " " & abs.Add()) WriteLine("Multiplication is" & " " & abs.Mul()) 'displaying output Read() End Sub End Module Q10. Encapsulation: encapsulation refers to how well a programming language hides the internal implemention of classes from users who use them. After all, users do not wan't to know and need not know how a specific class is implemented (the actual lines of code). They just use it. As an example, we use the File class yet we do not know how its implemented internally! For us, who use this class, the internal implementation details are useless in terms of its usage, anyway. This is known as encapsulation Q11.Garbage Collection. Garbage collection is the mechanism to release memory from unused objects and components of the applications. Q12. what is the difference between string and string builder? system. string is immutable, system.string builder was designed with the purpose of having a mutable string where a variety of operations can be performed. Q13. Difference Between Array and array list? Array is the collection of values of the same data type the variables in an array is called array elements Array is a reference type data type The array structure in System's Memory Array list is a class . when you want to access the elements of an array through its index value location in an array, use an Array List. The use of the arraylist is an alternative to the use of th array. The Methods Of Array List class are 1)Add 2)Remove 3)Clear 4)Insert 5)TrimToSize 6)Sort 7)Revers Q 14. What is the base class of .net? System.Object Q 15. What is Difference between Namespace and Assembly? Namespace is a collection of different classes. Whereas an assembly is the basic building blocks of the .net framework. Q16. What is the concept of destructors in VB.NET? Destructors are used to de-allocate resources i.e. to clean up after an object is no longer available. Finalize is the destructor which is normally used. Finalize is called automatically when the .NET runtime determines that the object is no longer being used. Q17. Explain about .NET? Basically .net is a framework and a development platform. It supports different technologies as well as different languages. With the help of CLR it is capable of providing facility to use more than one language within an application automatically when the .NET runtime determines that the object is no longer being used. Q18. What do you mean by Serialization and Deserialization and its use? To store the vb.net for data into an xml file is called Serialization. To load data from xml file to vb.net form is called DeSerialization. Q19. Whats the difference bt. .dll extension and .exe extension files? The main difference between .dll and .exe is .dll is the In process component where it take up the client's memory space to run. So the communication between the application and component(dll) is very fast. .EXE is the Out of process component. It uses its own memory(not application memory) to run the component. The communication between the application and component is slow when compared to .dll Q20.What is the difference between early binding and late binding? Calling a non-virtual method, decided at a compile time is known as early binding. Calling a virtual method (Pure Polymorphism), decided at a runtime is known as late binding. Q21 .What is Intermediate Langauge? Microsoft Intermediate Language(MSIL or IL) is the CPU -independent instruction set into which .Net framework programs are compiled. It contains instructions for loading, storing initializing, and calling methods on objects. Q22. What is Commom Language Runtime? CLR also known as Common Language Run time provides a environment in which program are executed, it activate object, perform security check on them, lay them out in the memory, execute them and garbage collect them. Q23. What is Common Type System? The common type system is a rich type system, built into the common language runtime, which supports the types and operations found in most programming languages. Q24. What is Common Language Specification? The Common Language Specification is a set of constructs and constraints that serves as a guide for library writers and compiler writers. Q25. Whats the difference between private and shared assembly? Private assembly is used inside an application only and does not have to be identified by a strong name. Shared assembly can be used by multiple applications and has to have a strong name. Q26. What are the advantages of an assembly? Increased performance. Better code management and encapsulation. It also introduces the n-tier concepts and business logic. Q27. What is Code Access Security? CAS - Code Access Security is the part of the .NET security model that determines whether or not a piece of code is allowed to run, and what resources it can use when it is running. Q28. What is the differences between dataset. Clone and dataset. Copy? Dataset. Clone copies just the structure of dataset (including all the datatables, schemas, relations and constraints.); however it doesnt copy the data. Dataset. Copy, copies both the dataset structure and the data. Q29. What is the use of Internal keyword? Internal keyword is one of the access specifier available in .Net framework , that makes a type visible in a given assembly , for e.g : a single dll can contain multiple modules. Q30. What is the difference between the Debug class and Trace class? Use Debug class for debug builds, use Trace class for both debug and release builds. Q31. What is the difference between a Thread and a Process? A Process is an instance of an running application. And a thread is the Execution stream of the Process. A process can have multiple Thread. Q32. What is a Constructor? A special Method Always called whenever an instance of the class is created. Q33. What is the GAC? Each computer where the common language runtime is installed has a machine-wide code cache called the global assembly cache. The global assembly cache stores assemblies that are to be shared by several applications on the computer. This area is typically the folder under windows or winnt in the machine. Q34. Explain the use of virtual, sealed, override, and abstract. A:The virtual keyword enables a class to be overridden. If it has to be prevented from being overridden, then the sealed keyword needs to be used. If the keyword virtual is not used, members of the class can even then be overridden. However, its usage is advised for making the code meaningful. The override keyword is used to override the virtual method in the base class. Abstract keyword is used to modify a class, method or property declaration. You cannot instantiate an abstract class or make calls to an abstract method directly. An abstract virtual method means that the definition of the method needs to be given in the derived class. Q35. What are the types of Authentication? There are 3 types of Authentication. Windows authentication Forms authentication Passport authentication. Q36. What is the use of JIT ? JIT (Just - In - Time) is a compiler which converts MSIL code to Native Code (ie. CPU-specific code that runs on the same computer architecture). Q37.What is Delegates? Delegates are a type-safe, object-oriented implementation of function pointers and are used in many situations where a component needs to call back to the component that is using it. Q38. What is a Static class? Static class is a class which can be used or accessed without creating an instance of the class. Q39. What are the two main parts of the .NET Framework? There are the two main parts of the .NET Framework are : The common language runtime (CLR). The .NET Framework class library. Q40. What are the difference between Structure and Class? Structures are value type and Classes are reference type. Structures cannot have contractors or destructors. Classes can have both contractors and destructors. Structures do not support Inheritance, while Classes support Inheritance Q41. What is difference between Class And Interface? Class : is logical representation of object. It is collection of data and related sub procedures with defination. Interface : is also a class containg methods which is not having any definations. Class does not support multiple inheritance. But interface can support.