-
Events can not be declared as shared in VB.NET
A) TrueB) FalseExplanation: Events can also be shared by declaring with Shared Keyword
-
-
-
Forms in VB.Net are saved in which of the following files
A) .frmB) .vbC) .frxExplanation: .frm &.frx are the file extensions of VB6
-
-
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
VB.NET Interview Questions
Ans