Вы находитесь на странице: 1из 4

Elance .

NET (Dot NET) Test Answers for IT Programmers

1. In C#, a local variable ________.

Is declared within a method


Can be used anywhere in the program
Must accept a class
Represents a class object

2. In which of the following GC Collection mode the garbage collector determines


whether the current time is optimal to reclaim objects?

Forced
Parallel
Concurrent
Optimized

3. Which of the following exception is thrown when a member/class lookup results in


more than one member/class matching the lookup criteria?

System.Reflection.AmbiguousMatchException
FileNotFoundException
FormatException
AppDomain.UnhandledException

4. Which of the following namespaces contain types that support deployment of


ClickOnce applications?

System.Deployment
System.ComponentModel
System.Data
System.Configuration

5. In ASP.NET, why is Global.asax used?

Neither of these
To implement application and session level events
To declare Global variables

6. In C#, what does the following code do: class Test: Form { }

Written and Solutions By: Md Mohaimenul Islam Manna

oDeskCare24.com

Creates the class Test : Form and creates the class Test that inherits the class
Form
Creates the class Test : Form
Creates the class Form that inherits the class Test
Creates the class Test that inherits the class Form

7. An event is often:

Not an object type


The result of a party
Code used to force a user action
The result of a user action

8. Which of the following is a valid syntax of entry point of all C# programs?

static Main(string[] args)


Static void Main(string[] args)
static void Main(string[] args)
static Main(string args)

9. Exception objects are derived from the _______ class.

Event
System
Catch
Exception

10. Which of the following keywords is used to include existing namespace in a C#


program?

using
namespace
import
package

11. A class declared with the sealed keyword cannot be a base class.

True
False

12. Which C# code will output an element's value from a multidimensional array?

Written and Solutions By: Md Mohaimenul Islam Manna

oDeskCare24.com

Console.WriteLine( myArray{1}{3} );
Console.WriteLine( myArray[1.3] );
Console.WriteLine( myArray[1][3] );
Console.WriteLine( myArray(1),(3) );

13. In C#, is it possible to pass methods as arguments for other methods without
modification.

True
False

14. An abstract class _______.

May contain instance variables


May extend another class
May contain constructors
All of these

15. In C#, a variable declared inside a method is called a _________ variable.

Private
Local
Static
Serial

16. True or false? In C#, a class can inherit from multiple interfaces.

False
True

17. In ASP.NET, postback occurs in which of the following forms?

Winforms
Webforms
HTMLForms

18. How do you manage states in an ASP.NET application?

Viewstate
Application objects
Session objects
All of these

Written and Solutions By: Md Mohaimenul Islam Manna

oDeskCare24.com

19. To configure authentication for your Web application so clients cannot access it
anonymously, but access is allowed for users from untrusted domains, where should the
following code be added to? <system.web> <authentication mode="Forms"> <forms
loginUrl="login.aspx" /> </authentication> <authorization> <deny users="?" />
</authorization> </system.web>

The app.config file


The project's property pages
The web.config file
The workstation's machine.config file

20. Which of the following is not a component of .Net framework?

Metadata and Assemblies


JVM
Windows Forms
Common Language Specification

21. In the body of a method, C# uses the variable named ________ to refer to the current
object whose method is being invoked.

that
do
this
call

Written and Solutions By: Md Mohaimenul Islam Manna

oDeskCare24.com

Вам также может понравиться