![]() |
| Home | Tech FAQ | Interview Questions | Placement Papers | Tech Articles | Learn | Freelance Projects | Online Testing | Geeks Talk | Job Postings | Knowledge Base | Site Search | Add/Ask Question |
![]() Related Questions A) A field always has Get and Set MethodsB) A property always has Get and Set MethodsC) None of the aboveExplanation: These methods are internally used set and retrieve values of a property. Latest Answer : ans cnone of the above ... A) Create a method and name it with the same name as class nameB) Create a method and which is named as NewC) Create a method and which is named as Initialize Latest Answer : A) Create a method and name it with the same name as class name ... A) ProcessB) ApplicationC) ExeD) Execute Latest Answer : Process ... A) EncapsulationB) Main functionC) Abstract Class/FunctionsD) Using Implementation Latest Answer : C) By using Abstract Classes/Functions ... A) User ControlB) Custom ControlC) ControlD) Activex Control Latest Answer : the base class control for all built in controls is the control ... 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 messagebox function in following codeClass Test Dim A, B, C as Byte, Sub Main() A=200 B=100 C=A+B Console.WriteLine ( C )End subEnd Class A) Prints 300 as the outputB) Prints “C”C) Compiler ErrorD) RunTime ErrorExplanation: Over flow exception as the sum of 2 bytes is always long 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 out put of the following codeMustInherit class MyFirstclassPublic Dim Num as IntegerPublic Sub New( I as integer) Num=iEnd SubEnd ClassClass Test Dim cls as New MyFirstclass( 100) Console.writeLine (cls.Num)End Class A) Can not Create an Instance of MyfirstClassB) MyFirstclass is created and 100 is assigned to Num variableC) Runtime Error What is the out put NotInheritable Class A Public sub printA End sub Public sub PrintB End subEnd ClassClass B Inherits A End Class A) Both PrintA & PrintB are available at Class BB) Only PrintA is available at Class BC) Class B Can not inherit classA as it is not inheritable
Sponsored Links
| |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||