-
Which is the base class for All built in Controls ?
A) User ControlB) Custom ControlC) ControlD) Activex Control
-
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 are the exceptions that VB.Net supports ,C# & other languages doesn’t support ?
A) When ClauseB) Exit Try statementC) Both 1& 2D) None
-
How do you write the schema of a Dataset to a XML
A) Dataset.WriteXMLB) Dataset.WritexmlschemaC) Dataset.AddxmlSchemaD) None
-
Webservices will have the file extension
A) .aspxB) .asmxC) .ascxExplanation: Web services files when compiled will have the .asmx file extension
-
What is the full form WSDL
A) Web Services Description LanguageB) Web Services Development LanguageC) Web Site Development Language
-
Select the keyword used to declare an event signature
A) SignatureB) EventC) EsigD) Eref
-
Every statement in VB.NET must end with “ ; “
A) TrueB) FalseExplanation: Statements in VB.NET need not to end with semicolon
-
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
-
In VB.NET Optional parameters must be
A) First parameter in method signatureB) Second parameter in method signatureC) Last parameter in method signatureD) None
-
-
Which of the following is not a value type in VB.NET
A) BooleanB) Int16C) ByteD) StringExplanation: String is a class in VB.NET hence it is a reference type but not value type.
-
The methods declared with the following modifiers are not accessible out side the current VB.NET project
A) PublicB) ProtectedC) FriendExplanation: Friend methods are internal to the active project they are not acceble out side the project.
-
Events can not be declared as shared in VB.NET
A) TrueB) FalseExplanation: Events can also be shared by declaring with Shared Keyword
-
VB.NET Interview Questions
Ans