-
What is the type of TRUNCATE statement, whether it is a DDL or DML type ?
I have read somewhere as DDL statement as it has implicit commit statement.
-
-
Forms in VB.Net are saved in which of the following files
A) .frmB) .vbC) .frxExplanation: .frm &.frx are the file extensions of VB6
-
-
-
Events can not be declared as shared in VB.NET
A) TrueB) FalseExplanation: Events can also be shared by declaring with Shared Keyword
-
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.
-
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.
-
Which of the following are the valid method of command object
A) ExecuteNonQuery & ExecuteScalarB) ExecuteQuery & ExecuteScalarC) ExecuteParameterD) None
-
Which of the following is a valid statement
A) I = Integer.Parse(S) ' where I is an integer and S is a stringB) I = Parse(S) ' where I is an integer and S is a stringC) S = Parse(I) 'where I is an integer and S is a stringD) None
-
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
-
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
-
Which of the following statement is wrong in case of Constructors in VB.NET ?
A) Constructors are always named as NewB) Constructors do not return anythingC) Constructors can not be parameterizedD) Constructors are implicitly called when an object is created
-
Which of the following functions have been removed in VB.NET from VB 6?
A) String( )B) IsEmpty( )C) DoEvents ( )D) All of the above
-
How to determine if a variable has not been initialized in VB.NET?
A) ISNull( )B) IsEmpty( )C) IsDdNull( )
-
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 class is used to run the EXE application file in VB.NET
A) ProcessB) ApplicationC) ExeD) Execute