-
In VB.NET Optional parameters must be
A) First parameter in method signatureB) Second parameter in method signatureC) Last parameter in method signatureD) None
-
What is the output of the following code in Test classClass Myclass Dim Num as Integer Private Sub New (i as integer) Num=i End subEnd class Class Test Sub Main() Dim c as MyclassC=New Myclass (10)End subEnd Class
A) Num variable of Myclass is initialized to 10B) Run Time ErrorC) Compiler ErrorD) StackOverflow ExceptionExplanation: Constructor is declared as Private hence Compile error
-
What is the output of the following codeClass _Myclass Public Shared Num as integer Public Sub New (I as integer) {num=i} End sub Public sub New() End sub End Class Class Test Dim Cls1 as _Myclass (100 ) Dim Cls2 as New _MyclassConsole.Writeline (Cls2.num)End Class
A) Prints 0B) Prints 100C) Prints NullExplanation: prints 100 because num is shared variable
-
Every statement in VB.NET must end with “ ; “
A) TrueB) FalseExplanation: Statements in VB.NET need not to end with semicolon
-
Select the keyword used to declare an event signature
A) SignatureB) EventC) EsigD) Eref
-
What is the full form WSDL
A) Web Services Description LanguageB) Web Services Development LanguageC) Web Site Development Language
-
Webservices will have the file extension
A) .aspxB) .asmxC) .ascxExplanation: Web services files when compiled will have the .asmx file extension
-
How do you write the schema of a Dataset to a XML
A) Dataset.WriteXMLB) Dataset.WritexmlschemaC) Dataset.AddxmlSchemaD) None
-
Which are the exceptions that VB.Net supports ,C# & other languages doesn’t support ?
A) When ClauseB) Exit Try statementC) Both 1& 2D) None
-
In VB.NET cross language integration is possible through
A) Common type SystemB) Common Translation SystemC) Reflection
-
What is the significance of Option Compare statement when it is set to On
A) Specifies that any variable name is declared (with type) before useB) Specifies whether strings should be compared as binaryC) Specifies that variables should be initialized before use
-
Class type in VB.NET is a value type
A) TrueB) FalseExplanation: Class is a reference type in VB.NET
-
VB.NET does not allow Parameterized properties
A) TrueB) FalseExplanation: IT does allow parameterized properties
-
What is abstraction?
A) Hiding the complex behaviors of the object from real worldB) Exposing the all the behaviors of the object to out sideC) Binding methods & properties of an object togetherExplanation: Abstraction is the level to which the object hides the complexities of the real world
-
Which is the base class for All built in Controls ?
A) User ControlB) Custom ControlC) ControlD) Activex Control
-
-
To implement an interface it is not necessary to implement all the methods and properties defined by the interface.
A) TrueB) FalseExplanation: Any class, which implements an interface, must implement all the members of that interface
-
The DataAdapter uses which of the following object to retrieve the data from database
A) ConnectionB) CommandC) DataReaderExplanation: Dataadapter uses connection object to connect to the database where as it uses Command object to retrieve the data
-
Much of the underlying integration of .NET is accomplished with XML
A) TrueB) FalseExplanation: Web services, Configurations, Assembly’s, ADO.NET extensively uses XML
-
Which of the following statements are not true in Vb.NET
A) Objects are of value TypesB) Constructors do not return anythingC) VB.Net Supports Multilevel inheritance
VB.NET Interview Questions
Ans