Here are the some important question on .NET & VB.NET i want to share Patten of .NET interview question & exam Paper Placement paper I Hope this one was very helpful to you all
What is .net?
Ans:.Net is Platform which provides advanced feature facilities for the web and window application along with the window services . The .Net is the Middle layer between the operathe Development ting System and the .Net application .The feature of .Net that the .Net Component can talk with each other without worrying about the language in which they are originally.. Two main components are CLR stands for the common Language Runtime and the .Net FrameWork Base classes. The CLR performs the task of converting the IL to native code Which gives the .Net applications to be language Independent . The Other component Like .Net FramwWork Base Classes act as services to be provided to the .Net applications.
Differences between VB.Net and C#, related to OOPS concepts?
ANS:VB.NET is a windows application Where as C# is a console
Difference Between Array and array list?
ANS: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 ArrayList.
>The use of the arraylist is an alternative to the use of th array.
>The Methods Of ArrayList class are
How can we remove Handlers at Run time ?
ANS:Remove Handler my obj.my Event, Address Of My Event Handler Private Sub Button Add_Click(ByVal sender As System.Object, By Val e As System.Event Args) Handles Button Add.Click
Add Handler Button2.Click, Address Of My Other Click
Private Sub Button Remove_Click(ByVal sender As System.Object, By Val e As System.Event Args) Handles Button Remove.Click
Remove Handler Button2.Click, Address Of My Click
what is the difference between string and stringbuilder?
ANS: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.
What is the base class of .net?
ANS:System.Object is the base class of .NET
It Supports all classes in the .NET Framework class hierarchy and provides low-level services to derived classes. This is the ultimate superclass of all classes in the .NET Framework; it is the root of the type hierarchy.
Base class is a root class or superior class from which we can extend classes.it is the topmost in the classes so other classes can be derived from this class but it is not derived from any class.Depending on procedure base class may or may not give its objects to derived classes of it.
How to store and retrieve images in SQL server database through VB.NET?
ANS:SQL Server supports the ability for clients to store objects within tables Image file can be save in SQL server as a byte. Henceforth, the image is convert to a stream of byte using the IO.Memory Stream. This stream of byte can be save in a table with image data type.
The process has to be reverse to retrieve the image from the server.
Whats the difference bt. .dll extension and .exe extension files?
ANS: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 Exe have starting Point and dll Dont’t have any starting poing and Used as services.
1)What is the difference between vb and vb.net ? 2)How to insert row by row data in datagrid ? 3) How to work with repeater controls and give small example program ?
ANS:vb is object based and vb.net is object oriented.In VB.net ,oops concept is used.
What are Satellite Assemblies?
ANS:Satellite assemblies are user for localizing the applications resources.
A satellite assembly is a DLL that contains only resource strings
.we typically have one satellite assembly DLL for each language. Because these satellite assembly DLLs are separated from the main assembly (an .exe or DLL), it is easier to drop in multi-language support as we progress in your development process.
What do you mean by ‘Option Strict On’ ?
Visual Basic language in general does not require explicit syntax to be used when performing operations that might not be optimally efficient (e.g. late binding) or that might fail at run time (e.g. narrowing conversions). This permissive semantics often prevents detection of coding errors and also affects the performance of the application.
VB.NET enables a programmer to enforce strict semantics by setting this option to "On". When used, this option should appear before any other code. This option can be set to "On" or "Off". If this statement is not specified, by default, it is set to "Off".
Syntax: Option Strict [On / Off]
When it is set to "On", it disallows any narrowing conversions to occur without an explicit cast operator, late binding and does not let the programmer omit "As" clause in the declaration statement. Since setting it to "On" requires explicit conversion, it also requires that the compiler be able to determine the type of each variable. Thus it is implied that Option Strict also means Option Explicit.
Visual Basic .NET allows implicit conversions of any data type to any other data type. However, data loss can occur if the value of one data type is converted to a data type with less precision or a smaller capacity. Setting this option to "On" ensures compile-time notification of these types of conversions so they may be avoided.
What is the difference between vb and vb.net ?
ANS: 1) VB.net is object oriented.
2) VB.net supports exception handling.
3) VB.net is strongly typed.
4) VB. Net supports multithreading.
5) VB.net now has console applications
* object based language
* does not support inheritance
* does not support for disconnected architechture
* no interoperability function
* no support for threading
* no powerful exceptional handling mechanism
* does not support console based applications
How to insert row by row data in datagrid ?
By seting Autogrid generate properity=false.
How VB Implements the Disconnected Architecture as like VB.Net?
ANS:In VB to implement a disconnected recordset, after you have filled the recordset with the data, set its active connection property to "Nothing". That breaks the connection to the database.You can locally also save the data of the recordset by using its Save function.
What are Jagged Arrarys ?
ANS:Define Jagged Arrays The other type of multidimensional array is the jagged array. A two dimensional jagged array can be thought of as a table where each row can have a different number of columns. Take for example, a table where families are the rows and family members are the columns. Unless each family has the same number of members, each row will have a variable number of columns. You can use a jagged array to represent such a table. A jagged array is really an array of arrays. To create a jagged array, you declare the array of arrays with multiple sets of parentheses or brackets and indicate the size of the jagged array in the first set of brackets (parentheses). Jagged array in nothing but array of arrays. in this jagged array length of the each can be differ. For example when you are creating a table in which the number of columns differ in each row ie the first row which can have 2 column and second row have 3 columns like that.
What is Try- Catch ?Finally Exception Handling?
ANS:Exceptions are Runtime errors that occur when an unexpected process causes the program to abort. Such kind of situations can be kept at bay using Exception Handling. By looking for potential problems in the code / entity life cycle, we can handle most of the errors that may encountered. As a result the application to continue to run without being dogged by errors. VB.NET supports Structured exception handling by using Try…Catch…Finally
The following code sample demonstrates how to use Try-Catch-Finally exception handling.
Dim a=0, b=1, c As Integer
c=b / a
‘the above line throws an exception
System.Console.WriteLine("C is " & c)
Catch e As Exception
‘catching the exception
The output of the above code displays a message stating the exception. The reason for the exception is because any number divided by zero is infinity.