Top 50 Vb.net Interview Questions
Q1. What Is The Root Namespace For All Types?
Imports machine.
Q2. What Is The Difference Between Clr & Cts?
CLR is the commonplace language runtime. That is the feature makes the .Internet programs to run plantform unbiased langauge interoperability.
CTS Common type gadget is the a part of the CLR which enable the Common Datatype gadget to All the .Net languages.It also defines conventions to convert gadgets from one langauge to every other
Q3. What Are The Objects In Asp.Net And Tell The Purpose Of Those Objects?
Here are five gadgets in asp.Net
Response: This item is to response to different e.G.
Request: This item is request from server.
Application: This item is keep international statistics of application.
Session: This item used shop the values into variable.
Server.
Q4. How Do You Use Two Datareaders At The Same Time In A Vb.Internet Windows Application ?
As an instance:
whilst(datareader1.Study())
even as(datareader2.Study())
stop whilst
end even as
this isn't always allowed despite the fact that each datareaders have two different units of facts.
Q5. How Does You Call And Execute A Sp In .Net?
Using command object we can execute a SP. Instead of sq. Question we ought to skip the SP Name.
[command.Connection =connectionstring
command.CommandType=commandType.StoredProcedure
command.Commandtext="sp_name"
command.Executenonquery()]
Q6. What Is The Difference B/w Readonly Variable And Constant Variable?
Variable used to shop the records
Read handiest variable:-
Read handiest variable approach examine handiest however no longer permit to jot down
steady:
steady variable specify the regular fee.
Q7. Why Is It Not A Good Idea To Insert Code Into Initializecomponent Method When Working With Visual Studio?
The dressmaker will probable via it away, most of the code inner lnitializeComponent is automobile-generated.
Q8. What Are Fixed Memory Leaks And Threads Locking Problems.
Memory leak is a worm inside the software which makes use of the memory constantly without liberating it till the device crash.Thread locking problem is not anything but a impasse state of affairs in case of synchronous process while two consecutive threads get lock on a commonplace aid and watching for each other to release that. This happens usually in case whilst the semaphores or video display units are not used.
Q9. What Is Datatype Conversion In Vb.Internet?
Convert one variable kind to any other one is known as datatype conversion we can also referred to as this casting in VB.NET a few mechanically conversion is likewise there.
Cbool CByte CChar Cdate CDec CDbI Cmi CLng CObj CShort CSng CStr CType Asc.
Q10. What Does Vs.Internet Contains ?
Visual Studio .Net is basically a framework which makes easy improvement of codes written in Various programming languages.. It carries two things
1.Framework Class Library: It contains diverse training controlled inside various namespaces.
2.Common Language Runtime: CLR is the execution engine which helps in compiling the IL code into device code,looks after security troubles and lots of different important duties.Web pages, windows apps, console programs, Class libraries are numerous options which can be created the usage of VS.Internet.
Q11. What Is An Abstract Class?
It is a category which includes at the least one abstract method(A approach without any implementation). Other methods may have implementations. This magnificence cannot be instantiated. It can constantly come to be a base magnificence for other lessons.
Q12. What Is The Common Language Runtime?
CLR method commaon language runtime for the dot net frame paintings.It's far the body work layer that resides above the working system and handels/ manages the execution of the .Net programs.Our .Net programs do not at once communicate with the running system however through CLR.
OUT .NET APPLICATION--->>CLR--->WINDOWS OS
Q13. What Is Clr?
CLR method Common Language Runtime.It is Major element of the .NET frameworkIt presents number of benefits to the developers inclusive of Exception handling,Security,Debugging and Versioning...
Q14. How Can I Extract The Formated Word(bold,italic,underline,font,shade Etc) From The Msword File.?
Using CommonDialog class
eg:
the code to invoke the default font dialog container by means of the usage of the FontDialog manage is given below:
non-public sub displayfont_click(byval sender as device.Object, byval e as gadget.Eventargs) handles displayfont .Click on fontdialog. ShowDialog()
textbox1.Font=fontdialog1.Font
stop sub
the code to invoke the default font dialog container with the aid of instantiating the fontdialog magnificence is:
dim fdialog as new fontdialog()
personal sub displayfont_click(byval sender as device.Object,byval e as gadget.Eventargs) handles displayfont. Click on fdialog. ShowDialog()
textbox1.Font=fontdialog1.Font
cease sub
Q15. Name Some Of The Features Present In Vb 2005?
Some of the features present in VB 2005 are as follows: -
*Edit and preserve: It lets in developers to adjust and execute programs almost simultaneously.
*Namespace: - This provides get admission to to various elements of the NET framework and it additionally dynamically generates instructions.
*Data source binding feature could be very useful for consumer server improvement.
Q16. What Is The Source Code For Display The Picture In Button Click Event?
PictureBox@Image = Image.FromFile(”C:olympicsO8_basketball .Gif”)
Q17. Explain About The Feature Anonymous Type?
Anonymous type is a feature of VB.NET and it allows records sorts to be constituted of the code which requires it. This characteristic is found in VB as well as C#. They should be saved in variables declared with the keyword VAR Dynamic typing is exceptional and shouldn’t be harassed with Anonymous kind.
Q18. What Is The Difference Between A "jagged Array" And Multidimensional Array" ?Can Anyone Show Me It Practically ?
Multidimentional array has same size in all dimentions however jagged is the form of multidimentional array which has exclusive size for its dimensions.
Int array[3][3][3]; //multidimentional array.
Int array[3][1][6]; //jagged array.
Q19. Whats The C# Equivalent Of C++ Catch (...), Which Was A Catch-all Statement For Any Possible Exception?
A catch block that catches the exception of type System. Exception. You can also omit the parameter facts kind in this example and simply write trap .
Q20. Columnmapping Belongs To Which Namespaces?
System.Data.Common.
Q21. How Do You Rate Yourself In .Internet ?
Based on Framework know-how and OOPS Concepts,Use of Different Component Library.
Q22. What Is Misl Code?
MSIL code is the Microsoft Intermediate Language. This is the code created with the aid of the CLR from the supply code. This MSIL code is transformed to machine/native code through JIT compiler. This device code is clearly the code which runs.
Q23. How Do You Do Multithreading Application In Vb ?
VB does not assist multithreading.
[Its the fastest and an excellent application provided in VB.Net. Due to which many operations can be done without any lapse of time. The system need not wait for an application or any task to get completed, rather it runs simultaneously.]
Q24. Can Any Body Tell Me The Code Procedure For Preparing Parameterized Cristel Reports.The Report Should Be Generated By Taking To Or More Parameters. Example: Report Should Be Genarated From Date To Tod
We can generate Crystal Report through the use of date parameter, however the date format need to be "yyyy,mm,dd".
Ex.CrystaReport1.SelectionFormula = "GLNOTE.L_DT=date(" & a & ")"
The variable 'a' must be assign with formated date.
Q25. What Would You Do To Remove Microsoft Visual Basic Name Space?
.NET has many new capabilities and alertness supportive tools. To eliminate Microsoft visual basic call area all you have to do is to
1) Remove the import manually on every occasion you begin the challenge.
2) Creating a template which does not include Microsoft Visual Basic namespace.
3) About new features and adjustments names you may refer to MSDN.
Q26. How Vb Implements The Disconnected Architecture As Like Vb.Internet?
In VB to put into effect a disconnected recordset, after you've got filled the recordset with the facts, set its energetic connection assets to “Nothing”. That breaks the connection to the database. You can regionally also shop the data of the recordset via using its Save function.
Q27. How Do You Validate Date By Using Which Validation Control?
<asp:regularexpressionvalidator id="regExpDate"
runat="server"
ValidationExpression="^d2[/-]d2[/-]d2,4$"
ErrorMessage="It is not a valid date"
ControlToValidate="txtpatientvisitdate"
EnableClientScript="False"
Display="Dynamic"></asp:regularexpressionvalidator>
Q28. What Is The Diff Between Vb Mdi Form And .Internet Mdi Form?
In VB MDI form is created through including MDI Form to the undertaking and including toddler bureaucracy by using setting MDICHILD assets of the kid shape. In .NET there's no MDI form, any shape may be made a MDI figure with the aid of setting IsMdiContainer belongings to TRUE.
Furthermore, there are adjustments in the homes, techniques and simple conduct of the MDI Forms, like capability to set Background Color isn't to be had in .NET, potential to feature controls to MDI shape(although they don't behave nicely), ActiveForm to ActiveMdiChild, Arrange approach to LayoutMdi, and so on.
Q29. Explain About The Ruby Interface Generator?
Ruby interface generator is primarily liable for supplying the visual part of the Visual fundamental and this turned into clubbed with “EB” designed for Omega database gadget. VBX interface changed into introduced to this selection which had the ability to load dynamic hyperlink libraries.
Q30. What Are Jagged Arrays ?
Jagged array is an array inside an array is referred to as a jagged array.
Q31. What Is The Difference Between Dataset And Recordset?
A DataSet can represent a whole relational database in memory, entire with tables, relations, and views.
-A DataSet is designed to paintings without any continuing connection to the original statistics source.
-Data in a DataSet is bulk-loaded, instead of being loaded on demand.
-There's no idea of cursor types in a DataSet.
-DataSets haven't any present day file pointer You can use For Each loops to transport through the information.
-You can keep many edits in a DataSet, and write them to the original facts supply in a single operation.
-Though the DataSet is popular, other items in ADO.NET come in specific versions for one of a kind statistics assets.
[1)With Data set you can retrive data from database like oracle and SQL Server and manage them in one dataset, with recordset this is not possible.
2)All representation of Dataset is using XML while recordset uses COM.
3)Recordset can not be transmitted on HTTP while Dataset can be.]
Q32. What Are The Difference Between Dispose(), Close(), Exit(), End()? When Do We Use Them?
Dispose(): should launch all of the assets that it owns.
Near():closing the application
exit():Exiting from the loop
stop():stops the execution of the web page/function/method
Q33. How Can We Remove Handlers At Run Time?
Remove Handler myobj.MyEvent, AddressOf MyEventHandler.
Q34. What Do You Mean By .Internet Framework
It is a group of classes and offerings.It exists as a layer among.NET applications and underlying operating device.I.E., it encapsulates the simple functionality that changed into in advance built into programming languages inclusive of debugging and protection services.
[.Net framework is a collection of services & classes.It exists as a layer b/w .Net applications 7 the underlying operating system.
.Net framework consists of web forms,window forms & console applications that pertain to the presentation layer of the aplication.
.Net framework consists of two other components,the .Net framework base classes & common language runtime(CLR).]
Q35. What Is The Advantage Of Option Strict On?
Visual Basic permits conversions of many data sorts to other records sorts. Data loss can occur when the fee of 1 statistics kind is transformed to a facts type with less precision or smaller capacity. A run-time error takes place if this kind of narrowing conversion fails. Option Strict ensures assemble-time notification of these narrowing conversions so they may be averted.
In addition to disallowing implicit narrowing conversions, Option Strict generates an blunders for past due binding. An object is overdue sure when it is assigned to a variable this is declared to be of type Object.
Because Option Strict On provides sturdy typing, prevents unintended kind conversions with statistics loss, disallows late binding, and improves performance, its use is strongly encouraged.
Q36. Name Some Of The Features Of C# Which Are Not Present In Vb.Internet?
Some of the features which aren't found in VB are as follows they're: -
1) It supports risky code blocks for improved performance.
2) Partial interfaces and anonymous strategies.
Three) Multi line remarks and static lessons. Etc
Q37. What Is Shadowing?
When international and nearby varible within the same name.The local varibale in a mehod or characteristic which use to override the worldwide is called the shadowing.Ie the Global varible is being shadowed by the local varible.
Q38. What Do You Mean By Option Strict On?
Option Strict On will limit the implicit kind casting (defalut is off in vb,net)
Q39. When We Will Use Console?
Console is used most effective for net software.
Q40. Differences Between Vb.Internet And C#, Related To Oops Concepts?
VB.NET is a windows utility wherein as C# is a console.
Q41. How Does You Get Record No From five To 15 From A Dataset Of one hundred Records?
Dim dRow as facts.Datarow
for i as interger = 5 to fifteen
drow = dSet.Tables(0).Rows(i)
'procedure row
next i
Q42. What Do You Mean By Serialization And Deserialization And It's Use.
Serilization: It is the system of maintaning object state in the form of a stream.
Deserilization: It is the process of studying the stream and construct the item.
Uses:(Remoting Concept)
1) making item kingdom persistent
2) transmitting the object from one device to another system.
Q43. What Is The Difference Between An Xml "fragment" And An Xml "file" ?
An XML fragment is an XML report and not using a unmarried pinnacle-degree root detail To positioned it simple it is a part (fragment) of a nicely-formed xml report. (node) Where as a nicely- shaped xml document have to have simplest one root detail.
Q44. How To Send Xml File On Server Using Http Protocol?
Through SOAP Protocol.
Q45. How Can We Assigns Items On Listbox So That It Will Show Rowwise Please Write The Code For It.
Lisbox1.Items.Add "Prashant"
Lisbox1.Items.Add "Chinchu"
Lisbox1.Items.Add "Pallavi"
Lisbox1.Items.Add "Suresh"
Lisbox1.Items.Add "Polika"
Q46. What Is The Difference Between Manifest And Metadata?
Manifest and metadata are 2 parts of assembly structure.
Manifest is used for storing AssemblyName, AssemblyTitle,publicKey.
Metadata includes Namespaces, Classes.
Q47. Why Datareader Is Useful?
Data reader is useful when we simply want to acccess datas from the database not when we need to perform DML operations. And It is beneficial while we need to carry out forward most effective reading of datas.It wont requires any big quantity of assets in the Front end. [Datareader is read only or forward only. So it is very fast to fetch the data from database.]
Q48. Explain About .Internet?
.NET is a Microsoft Framework and a software issue. . NET has a huge library of pre-coded answers which supplied developer considerable assist in growing programs with solutions already present. It offers dependable protection and move platform compatibility.
Q49. What Is The Advantage Of Packaging Over Xcopy In .Net?
Xcopy method is to in reality reproduction your net application documents to the production server tough power and set a virtual listing there. The putting of a digital listing is wanted by several deployment schemes and can be accomplished from Internet Information Manager Microsoft Management Consol.
It's continually appropriate to package your internet programs such that they may be clean to installation on the manufacturing server then the conventional xcopy wherein the builders have to use the command line.
Q50. Differences Between Vb.Net And C#, Related To Oops Concepts?
@C# uses Must not Inherit, VB.Net uses sealed elegance
@C# uses Internal, VB.Net makes use of Friend
@VB.Net uses with occasions and cease activities
@C# uses abstract and VB.Net uses Must Inherit
