You are on page 1of 122

MS.

NET

1. Which of the following statements are TRUE about the .NET CLR?
1. It provides a language-neutral development & execution environment.
2. It ensures that an application would not be able to access memory that it is
not authorized to access.
3. It provides services to run "managed" applications.
4. The resources are garbage collected.
5. It provides services to run "unmanaged" applications.

A. Only 1 and 2
B. Only 1, 2 and 4
C.1, 2, 3, 4
D.Only 4 and 5

2. Which of the following statements is correct about Managed Code?


A.Managed code is the code that is compiled by the JIT compilers.
B. Managed code is the code where resources are Garbage Collected.
C. Managed code is the code that runs on top of Windows.
D. Managed code is the code that is written to target the services of the CLR.

3. Which of the following utilities can be used to compile managed assemblies into
processor-specific native code?
A. gacutil
B. ngen
C. sn
D. ildasm

. 4. Which of the following are NOT true about .NET Framework?


1. It provides a consistent object-oriented programming environment whether object
code is stored and executed locally, executed locally but Internet-distributed, or
executed remotely.
2. It provides a code-execution environment that minimizes software deployment
and versioning conflicts.
3. It provides a code-execution environment that promotes safe execution of code,
including code created by an unknown or semi-trusted third party.
4. It provides different programming models for Windows-based applications and
Web-based applications.
5. It provides an event driven programming model for building Windows Device
Drivers.

A. 1, 2
B. 2, 4
C. 4, 5
D. 1, 2, 4

5. Code that targets the Common Language Runtime is known as


A. Unmanaged
B. Distributed
C. Legacy
D. Managed Code

6. Which of the following statements is correct about the .NET Framework?


A. .NET Framework uses DCOM for achieving language interoperability.
B. .NET Framework is built on the DCOM technology.
C. .NET Framework uses DCOM for making transition between managed and
unmanaged code.
D. .NET Framework uses DCOM for creating unmanaged applications.

7.Which of the following are parts of the .NET Framework?


1. The Common Language Runtime (CLR)
2. The Framework Class Libraries (FCL)
3. Microsoft Published Web Services
4. Applications deployed on IIS

A. Only 1, 2, 3
B. Only 1, 2
C. Only 1, 2, 4
D. Only 4

8. Application Domain is useful when you need to unload loaded assembly.


A. Yes Always
B. No for security reasons
C. Only if assembly is in current directory
D. Only if assembly is in GAC

9. Which of the following is NOT a namespace in the .NET Framework Class Library?
A. System.Process
B. System.Security
C. System.Threading
D. System.Drawing
E. System.Xml

10. Which of the following statements is correct about a namespace in C#.NET?


A. Namespaces help us to control the visibility of the elements present in it.
B. A namespace can contain a class but not another namespace.
C. If not mentioned, then the name 'root' gets assigned to the namespace.
D. It is necessary to use the using statement to be able to use an element of a
namespace.

11. Which of the following is absolutely neccessary to use a class Point present in
namespace Graph stored in library?
A. Use fully qualified name of the Point class.
B. Use using statement before using the Point class.
C. Add Reference of the library before using the Point class.
D. Use using statement before using the Point class.

12. Which of the followings are NOT a .NET namespace?


1. System.Web
2. System.Process
3. System.Data
4. System.Drawing2D
5. System.Drawing3D

A. 1, 3
B. 2, 4, 5
C. 3, 5
D. 1, 2, 3

13. Which of the following statements is correct about a namespace used in


C#.NET?
A. Nested namespaces are not allowed.
B. Importing outer namespace imports inner namespace.
C. Nested namespaces are allowed.
D. If nested, the namespaces cannot be split across files.

14. Which of the following is an 8-byte Integer?


A.Char
B. Long
C. Short
D. Byte

15. Which of the following statements is correct?


A. Information is never lost during narrowing conversions.
B. The CInteger() function can be used to convert a Single to an Integer.
C. Widening conversions take place automatically.
D. Assigning an Integer to an Object type is known as Unboxing.

16. Which of the following are value types?


1. Integer
2. Array
3. Single
4. String
5. Long

A. 1, 2, 5
B. 1, 3, 5
C. 2, 4
D. 3, 5

17. Which of the following is NOT an Arithmetic operator in C#.NET?


A. **
B. +
C. /
D. %

18. Which of the following is NOT a Bitwise operator in C#.NET?


A. &
B. |
C. <<
D. ^

19. Which of the following statements are correct about the Bitwise & operator used
in C#.NET?
1. The & operator can be used to Invert a bit.
2. The & operator can be used to put ON a bit.
3. The & operator can be used to put OFF a bit.
4. The & operator can be used to check whether a bit is ON.
5. The & operator can be used to check whether a bit is OFF.

A. 1, 2, 4
B. 2, 3, 5
C. 3, 4
D. 3, 4, 5

20. Which of the following statements is correct about namespaces in C#.NET?


A.Namespaces can be nested only up to level 5.
B. A namespace cannot be nested.
C. There is no limit on the number of levels while nesting namespaces.
D. If namespaces are nested, then it is necessary to use using statement while using
the elements of the inner namespace.

21. Which of the following statements is correct about the using statement used in
C#.NET?
A. using statement can be placed anywhere in the C#.NET source code file.
B. It is permitted to define a member at namespace level as a using alias.
C. A C#.NET source code file can contain any number of using statement.
D. By using using statement it is possible to create an alias for the namespace but
not for the namespace element.

22. Which of the following is the necessary condition for implementing delegates?
A. Class declaration
B. Inheritance
C. Run-time Polymorphism
D. Exceptions

23. Which of the following statements are correct about the delegate declaration given
below?
delegate void del(int i);
1. On declaring the delegate a class called del will get created.
2. The signature of del need not be same as the signature of the method that we
intend to call using it.
3. The del class will be derived from the MulticastDelegate class.
4. The method that can be called using del should not be a static method.
5. The del class will contain a one-argument constructor and an lnvoke() method.

A. 1, 2 and 3 only
B. 1, 3 and 5 only
C. 2 and 4 only
D. 4 only

24. Which of the following statements is incorrect about delegate?


A. Delegates are reference types.
B. Delegates are object oriented.
C. Delegates are type-safe.
D. Only one method can be called using a delegate.

25. Which of the following statements are correct about a delegate?


1. Inheritance is a prerequisite for using delegates.
2. Delegates are type-safe.
3. Delegates provide wrappers for function pointers.
4. The declaration of a delegate must match the signature of the method that we
intend to call using it.
5. Functions called using delegates are always late-bound.

A. 1 and 2 only
B. 1, 2 and 3 only
C. 2, 3 and 4 only
D. None of the above

26. Which of the following statements are correct about delegates?


1. Delegates are not type-safe.
2. Delegate is a user-defined type.
3. Only one method can be bound with one delegate object.
4. Delegates can be used to implement callback notification.
5. Delegates permit execution of a method on a secondary thread in an
asynchronous manner.

A. 1 and 2 only
B. 1, 2 and 3 only
C. 2, 4 and 5 only
D. All of the above

27. Suppose on pushing a button an object is to be notified, but it is not known until
runtime which object should be notified. Which of the following programming
constructs should be used to implement this idea?
A. Attribute
B. Delegate
C. Namespace
D. Interface

28. Which one of the following classes are present System.Collections.Generic


namespace?
1. Stack
2. Tree
3. SortedDictionary
4. SortedArray

A. 1 and 2 only
B. 2 and 4 only
C. 1 and 3 only
D. All of the above

29. For the code snippet shown below, which of the following statements are valid?
public class Generic<T>
{
public T Field;
public void TestSub()
{
T i = Field + 1;
}
}
class MyProgram
{
static void Main(string[] args)
{
Generic<int> gen = new Generic<int>();
gen.TestSub();
}
}

A. Addition will produce result 1.


B. Result of addition is system-dependent.
C. Program will generate run-time exception.
D. Compiler will report an error: Operator '+' is not defined for types T and
int.
30. Which of the following statements are valid about generics in .NET Framework?
1. Generics is a language feature.
2. We can create a generic class, however, we cannot create a generic interface in
C#.NET.
3. Generics delegates are not allowed in C#.NET.
4. Generics are useful in collection classes in .NET framework.
5. None of the above

A. 1 and 2 Only
B. 1, 2 and 3 Only
C. 1 and 4 Only
D. All of the above

31. Which of the following statements is valid about generic procedures in C#.NET?
A. All procedures in a Generic class are generic.
B. Only those procedures labeled as Generic are generic.
C. Generic procedures can take at the most one generic parameter.
D. Generic procedures must take at least one type parameter.

32. For the code snippet given below, which of the following statements is valid?
public class Generic<T>
{
public T Field;
}
class Program
{
static void Main(string[ ] args)
{
Generic<String> g = new Generic<String>();
g.Field = "Hello";
Console.WriteLine(g.Field);
}
}

A. It will print string "Hello" on the console.


B. Name Generic cannot be used as a class name because it's a keyword.
C. Compiler will give an error.
D. Member Field of class Generic is not accessible directly.

33. For the code snippet given below, which of the following statements are valid?
public class MyContainer<T> where T: IComparabte
{
// Insert code here
}
1. Class MyContainer requires that it's type argument must implement IComparabte
interface.
2. Type argument of class MyContainer must be IComparabte.
3. Compiler will report an error for this block of code.
4. This requirement on type argument is called as constraint.

A. 1 and 2 Only
B. 1, 2 and 3 Only
C. 1 and 4 Only
D. All of the above

34. Which of the following statements is valid about advantages of generics?


A. Generics shift the burden of type safety to the programmer rather than compiler.
B. Generics require use of explicit type casting.
C. Generics provide type safety without the overhead of multiple
implementations.
D. Generics eliminate the possibility of run-time errors.

35. Which of the following statements are correct about an ArrayList collection that
implements the IEnumerable interface?
1. The ArrayList class contains an inner class that implements
theIEnumerator interface.
2. An ArrayList Collection cannot be accessed simultaneously by different
threads.
3. The inner class of ArrayList can access ArrayList class's members.
4. To access members of ArrayList from the inner class, it is necessary to pass
ArrayList class's reference to it.
5. Enumerator's of ArrayList Collection can manipulate the array.

A. 1 and 2 only
B. 1 and 3 and 4 only
C. 2 and 5 only
D. All of the above

36. In which of the following collections is the Input/Output index-based?


1. Stack
2. Queue
3. BitArray
4. ArrayList
5. HashTable

A. 1 and 2 only
B. 3 and 4 only
C. 5 only
D. 1, 2 and 5 only

37. Which of the following is an ordered collection class?


1. Map
2. Stack
3. Queue
4. BitArray
5. HashTable

A. 1 only
B. 2 and 3 only
C. 4 and 5 only
D. All of the above

38. Which of the following statements is correct about an Exception?


A. It occurs during compilation.
B. It occurs during linking.
C. It occurs at run-time.
D. It occurs during Just-In-Time compilation.
39. In C#.NET if we do not catch the exception thrown at runtime then which of the
following will catch it?
A. Compiler
B. CLR
C. Linker
D. Loader

40. Which of the following statements are correct about exception handling in C#.NET?
1. If our program does not catch an exception then the .NET CLR catches it.
2. It is possible to create user-defined exceptions.
3. All types of exceptions can be caught using the Exception class.
4. CLRExceptions is the base class for all exception classes.
5. For every try block there must be a corresponding finally block.

A. 1 and 2 only
B. 1, 2 and 3 only
C. 4 and 5 only
D. All of the above

41. Which of the following is NOT a .NET Exception class?


A. Exception
B. StackMemoryException
C. DivideByZeroException
D. OutOfMemoryException

42. A property can be declared inside a class, struct, Interface.


A. True
B. False

43. ADO.NET provides the ability to create and process in-memory databases called:
A. views
B. relations
C. tables
D. datasets.

44. What are major difference between classic ADO and ADO.NET?
A. In ADO we have recordset and in ADO.NET we have dataset.
B. In recordset we can only have one table. If we want to accommodate more than one
tables. We need to do inner join and fill the recordset. Dataset can have multiple tables.
C. All data persist in XML as compared to classic ADO where data persisted in Binary
format also.
D. All of the above

45. BindingContext, CurrencyManager and PropertyManager are the classes of -----


namespace.
A. System.Object
B. System.Data
C. System.Windows.Forms
D. System.Windows

46.The DataBindings property is an instance of ---------


A. ControlCollection
B. CurrencyManager
C. ControlBindingsCollection
D. Control
47. Under ADO.NET object is used to populate DataSets
A. DataReader
B. DataAdapter
C. Command
D. None of the above

48. Which methods provided by the dataset object to generate XML in ADO.Net?
A. ReadXML
B. GetXML
C. Writexml
D. All of Above

49. The DataSet object is a storage.


A. connected
B. disconnected
C. polling
D. None

50. ASP.NET web page is implemented in a file with extension.

A: .ashx
B: .asmx
C: .aspx
D: .asp

51. ASP.NET separates the HTML output from program logic using a feature named as
Answer Choices
A: Exception
B: Code-behind
C: Code-front
D: None of the above

52. Which of the following denote the web control associated with Table control function f
ASP.NET?

A: DataList
B: ListBox
C: TableRow
D: All the Above

53. An alternate ways of diplaying text on web page using


A asp:label
B asp:listitem
C asp:button
D asp:text

54. How do you get information from a form that is submitted using "post" method
A Request.QueryString
B Request.Form
C Rsponse.write
D Response.writeln
55. Which of the following object is used along with application object in order to ensure
that only process accessess a variable at a time

A Synchronize
B Synchronize()
C ThreadLock
D Lock()

56. Which of the following is the way to moniter the web application ?
A MMC Event viewers
B Performance logs
C Alerts Snap-ins
D ALL

57. If a developer of ASP.NET defines style information in a common location. Then that
location is called as
A: Master Page
B: Theme
C: Customization
D: None of the Above

58. In ASP.NET, Session. method cancels the current session.


A: Refused
B: Stop
C: EndSession
D: Abandon

59. In ASP.NET if one uses Windows authentication the current request attaches an
object called as
A: Serialization
B: WindowsPrincipal
C: WindowDataset
D: None of the Above.
60. Which of the following authentication is best suited for a corporate network ?
A Windows
B Form
C User
D All

61. The command-line tool generates code and map the LINQ to SQL
component.
A: SqlMetal.exe
B: Sql.exe
C: MetalSql.exe
D: None of the above
62. Which assembly represents the core LINQ API?
A: System.Data.dll
B: System.DataReader.dll
C: System.Query.dll
D: System.Linq.dll

64. 0.0.0.0 IP Address is refered using?


Answer Choices
A: IPAddress.Any
B: IPAddress.First
C: IPAddress.All
D: IPAddress.Default

65. System.Net.Sockets. is used to connect to a TCP server.

A: TcpListener

B: UdpClient

C: TcpClient

D: UdpListener

66. Which of the following is true about WPF application settings:


A. The Application Settings are read-only, they can only be written at design
time.
B. The Application Settings are static, they can be written at runtime time.
C. The Application Settings are dynamic, they can only be written at design
time.
D. The Application Settings are read-only, they can only be written at runtime.

67. How many type of templates are available in WPF..?

A. Data Templates
B. Control Templates
C. Item Panel Templates
D. All of the above

68. For building workflow-based applications on Windows quickly, the WF


consists of:
A. Programming model
B. Workflow designer
C. Rules engine
D. All of the above

69. How many types of transport schemas are there in WCF?


A .HTTP, TCP
B. Peer network, IPC (Inter-Process Communication over named pipes)
C. MSMQ
D. All of the above

69. Types of Contracts in WCF


A. Service Contracts
B. Fault Contracts
C. Only 1
D. Only 1 and 2

70. Where we can host WCF services?


A. IIS
B. Self Hosting
C. WAS (Windows Activation Service)
D. All of the above.

71. describes the data and operations exposed by a WCF service.


A. Contract
B. Channel
C. Binding
D. All of the aboave

72. interfaces WPF to DirectX.

A . mscorlib.dll
B. milcore.dll
C. mscoree.dll
D. All of the above

73. System.Data. provider is used for accessing MS Access database in .NET.

A. SqlClient
B. OleDb
C. Odbc
D. All of the above

74. TransactionScopeOption. always starts a transaction for a given scope.

A. Suppress
B. Required
C. RequiresNew
D. All of the above

1. Which of the following query is /are include in LINQ (Language Integrated Query)?
1.LINQ to object and LINQ to XML 2. LINQ to SQL
3. Both 1 and 2 4. LINQ to Class

2. What is Manifest in .NET?


1. In .NET Framework Namespace metadata stored in Manifest.
2. In .NET Framework Assembly metadata stored in Manifest.
3. .NET Framework use Manifest to stored only Assemblies version.
4. None of the above

3. contains changes and improvements in numerous areas, including versioning, the


application model, data binding, controls, documents, annotations, and 3-D UI elements.
1.Windows Communication Foundationmk 2. Windows Presentation Foundation
3. Windows Workflow Foundation 4. None of the above

4. Which of the following new control added along with a new data source control called the
LinqDataSource in ASP. Net3.5?
1. ListView, DataPager 2. Gridview, Datagrid
3. Gridview, DataView 4. DataPager

5. Which of the following is FALSE regarding workflow Code Conditions and Declarative Rule
Conditions?
a. Code Conditions can be modified at runtime without the need to recompile any code
Conditions work by writing code within an event handler that evaluate to a Boolean result
b. Declarative Rule Conditions are defined separately from the workflow code
1. Only a 2. Only b
3. Both a and b 4. None of the above

6. Which of the assembly is used to include the implementation for LINQ to Dataset?
1. System.Xml.Linq.dll 2. System.Data.Linq.dll
3. System.Core.dll 4. System.Data.DataSetExtensions.dll
7. Manifest contains all the metadata needed to do which of the following?
1. Version of assemblies 2. Scope of assemblies.
3. Reference to resource and class 4. All of the above

8. Which of the following is /are the main Components of the WCF?


1.Service class 2. Hosting environment
3. End point 4. All of the above

9. Which of the following is true about Namespace in .NET?


1. An assembly can contain any number of Namespace
2. Same namespace can exist in different assemblies
3. Namespace is a logically group types
4. All of the above

10. Our application assemblies need to be installed into the G AC (Global Assembly Cache).
What deployment strategy should we adopt?
1.Use XCOPY to copy the files 2. Use ClickOnce.
3. Create a Setup Application 4. Create a CAB project

11. You are designing a new windows workflow that meets the needs of the HR department of
you organization. This workflow should contain an activity that calls a local service with a set of
parameters. Which type of activity should you add to the workflow?
1. StateActivity 2. CallExternalMethodActivity
3. EventDrivenActivity 4. CompensateActivity

12. We are developing a .NET assembly, which will be used from both, .NET components and
COM components. Which of the following utilities do we need to use to ensure that COM
components can access your assembly as easily as possible?
1.gacutil 2. sn
3. regasm 4. All of the above

13. do you mean by CAS?


1. Code Access Security 3.lass Access Security
3. Code Access Services 4.lass Access Service

14.We are developing a .NET assembly, which will be used from both, .NET components and
COM components. Which of the following code is used to notify the caller that incorrect
arguments were passed to a method?
1. Marshal.ThrowExceptionForHR(0x80070057);
2. throw new ArgumentException(“Invalid Argument”);
3. Return Marshal.GetExceptionForHR(0x8007005);
4. Exception e = new Exception(“Invalid argument”);
e.HResult = 0x80070057; throw e;

15. Which of the following control does not have any visible interface?
1. Repeater 2. DataList
3. Datagrid 4. DropdownList

16. Which of the following code is used to retrieve a reference to the current application domain?
1. AppDomain ad = AppDomain.GetCurrentDomain();
2. AppDomain ad = AppDomain.Current;
3. AppDomain ad = Thread.CurrentThread.CurrentDomain;
4. AppDomain ad = Thread.GetDomain();

17.A project on which you are working calls for you to store small amount of frequently
changing information about a page on the client. For this project, security is not a worry. Which
is the best method to use?
1. A cookie 2. A hidden form field
3. A query string 4. A javascript function

18. Our application is failing when a particular variable equals 20. Unfortunately, we cannot
predict when this will happen. Which debugging tool should we use to investigate the problem?
a) Locals Window 2. Conditional Breakpoint
3. Output Window 4. Immediate Window

19. An Activity is the fundamental building block of workflows. An Activity defines a set of
properties and events, such as any class, along with execution logic that defines the activity's
run-time behavior. A set of additional components can be associated with an Activity. Which of
the following class do all activities derive from?
1. System.Workflow.ComponentModel.CodeActivity
2. System.Workflow.ComponentModel.ActivityBind
3. System.Workflow.ComponentModel.Compos iteActivity
4. System.Workflow.ComponentModel.Activity
20. We would like to give the user the ability to customize our application so that it fits in better
with his or her company’s corporate look and feel. In particular, we want to let the user specify
text to appear in the title bar of the main menu form. How should we add this ability to our
application?
a) Run code in the form’s Load event to retrieve the form’s text from a text file by using a
FileStream object.
2. Supply full source code with your application and tell users that they can edit the text and
rebuild the application.
3. Let the user edit the text in the Registry and use the Microsoft.Win32.Registry class to
retrieve the value that the
user saves.
4. Make the Text property of the form a dynamic property and provide an XML file that the user
can edit to set the
value of the property.
21. Which of the following is true about ASP.net support?
a. ASP.NET support server-side includes and server-side object tags
b. ASP.NET doesn't support server-side includes but supports server-side object tags
1. Only a 2. Only b
3. Both a and b 4. None of the above

22. We are moving an existing COM-based application to .NET. Part of our existing application
depends on a third-party COM-based library to which we do not have the source code. The
library is implemented as a set of objects with no user interface. How should we proceed?
1. Use the ActiveX Control Importer to import the library.
2. Build a Runtime Callable Wrapper (RCW) for the library.
3. Rewrite the library into managed code.
4. Build a COM callable wrapper for the library.

23. Which of the following is true about Smart navigation?


1. Persist scroll position when moving from page to page
2. Doesn't work with sites protected with SSL
3. Both a and b
4. None of the above

24. We are planning to deploy an assembly into the GAC so that it can be used by any
application on the target computer. What must we do?
1. Sign the assembly with a strong name.
2. Compile the assembly with the default Release configuration.
3. Sign the assembly with an Authenticode certificate.
4. Use regedit to add a key to the AssemblyFolders key in the Registry.

25. You are working on a project for your company. The project makes extensive use of the
System.Data.SqlClient namespace to read and write data to a SQL Server database. You have
created an SQLCommand object and set its CommandText property. What must you do before
executing the SQLCommand object?
1. Set its Notification property to null
2. Open the connection for the SQLCommand
3. Set its Site property to the local SQLConnection
4. Set the commands timeout property

26. We have purchased a library of shared communications routines that is delivered as a .NET
assembly. We want to make the classes in this assembly available to all your .NET applications.
Where should we install the assembly?
1. In the directory specified by the ASSEMBLY environment variable
2. In each application’s private directory
3. In C:\WINNT\System32
4. In the GAC

27. We are using the Installer tool (installutil.exe) to install a set of components. We issue the
following command to do so: installutil Assembly1.exe Assembly2.exe Assembly3.exe Assembly2
fails to install properly on the target computer. Which assemblies will be installed by the
command?
1. Only Assembly1.exe will be installed. 2. Both Assembly1.exe and
Assembly2.exe
3. None of the assemblies will be installed. 4. Only Assembly3.exe will be installed.
28. Which of the following cache strategy is best option if we are developing a web application
that is retrieving historical books information from a database server and displays it to the users
of our application?
1. Use the cache object 2. Use the ASP.NET central cache
3. Use the client cache 4. Use the output cache

29. What is the fastest way to concat strings in ASP.NET?


1. Write code that uses the Append method of the StringBuilder object.
2. Write code that uses the Substring method of the String object.
3. Write code that uses the Concat method of the String object
4. Write code that uses the plus-sign (+) operator to concatenate the strings.

30. Which of the following code is used to turn Session state off for an entire application?
a) In web.config file, set <EnableSessionState=”False”/>
2. In machine.config file, set <EnableSessionState=”False”/>
3. In web.config file, set <sessionstate mode=”False”/>
4. In machine.config file, set <sessionstate mode=”False”/>
31. A software development team is working on a next generation web application for a gaming
company. The website uses several nice AJAX style Javascript libraries to show images using
fading and animation. One page should start displaying the animation as soon as the page loads.
You want to inject the Javascript programmatically. Which of the following code method is
suitable?

1. Page.ClientScript.RegisterClientScriptInclude
2. Page.ClientScript.RegisterClientScriptResource
3. Page.ClientScript.RegisterStartupScript
4. Page.Client.RegisterStartupScript

32. We are creating an ASP.NET application for tracking student examinations. We use Microsoft
Windows authentication. Students are members of a Students group, and teachers are members
of a Teachers group. The root folder for our application is named Exams. The Exams folder
displays information about pending examinations. The Exams folder has a subfolder named
Grades. Both Students and teachers can access pages in Exams. Only teachers can access page
in Grades. We create the following entries in the Web.config
file in Exams.
1 <authentication mode =”Windows ” / > 2 <authorization>
3 <allow roles =”Students, Teachers ” / > 4 <deny users =”*” / >
5 </ authorization>
33. You are developing a large image gallery web application, in which you have created a new
web services that you want to call asynchronously using AJAX techniques. However, when you
try and call the method it does not appear to be available. What could be the possible cause of
this?
1. You forgot to add[System.Web.Script.Services.ScriptService]
to the web service class
2. You forgot to add [System.Web.Script.Services.ScriptMethod] to the web service class
3. You forgot to add [System.Web.Script.Services.GenerateScript Type] to the web service class
4. You forgot to add [System.Web.Script.Services.GenerateScript] to the web service class

34. We create the following entries in the Web.config file in Grades.


1 <authentication mode =”Windows ” / > 2. <authorization>
3 <allow roles =”Teachers ” / > 4 <deny users =”*” / >
5 </ authorization>

35. When teachers try to access pages in the Grades folder, they receive an error message that
reads in part: “An error occurred during the processing of a configuration file required to service
this request.” We need to ensure that teacher’s can access pages in the Grades folder. What
should we do?
a) Modify line 4 in the Web.config file in Grades as follows:
<allow users =”*” / >
2. Add the following line between line 1 and line 2 in the Web.config file in Grades:
<identity impersonate =”true ” / >
3. Add the following line between line 1 and line 2 in the Web.config file in Grades:
<identity impersonate =”false ” / >
4. Remove line 1 in the Web.config file in Grades.

36. You are developing an application in which you have to implement workflow that follows a
sequence like a flowchart, progressing from one stage to another without turning back. Which of
the following type of workflow is suitable for this application?
1. Sequential workflow 2. State Machine Workflow
3. Rules-Driven Workflow 4. Liner workflow

37. Which of the following is sequence of steps for Asp .Net life cycle?
1. Page_Init>> Page_Load>>
LoadViewState>> LoadPostData >>
Page_UnLoad
2. Page_Init>> Page_Load>> LoadPostData
>>LoadViewState>> Page_UnLoad
3. Page_Init>> LoadViewState>>
LoadPostData >>
Page_Load>>Page_UnLoad
4. Page_Init>> LoadPostData
>>LoadViewState>>
Page_Load>>Page_UnLoad

38. We are creating an ASP.NET application. The application will be deployed on CDAC intranet.
CDAC uses Microsoft Windows authentication. We want the application to run in the security
context of the user.
What should we do?
1. Add the following element to the authentication section of the Web.config file:
<allow users =”? ”/ >
2. Add the following element to the system.web section of the Web.config file:
<identity impersonate =”true ”/ >
3. Use the Configuration Manager for your project to designate the user’s security context.
4. Write code in the Application_AuthenticateRequest event handler to configure the application
to run in the user’s
security context.

39. I am working on a process monitoring application that launches a Windows Form, passes
some keystrokes to the form and then closes the application. Which method of the Process
object should I use to close this application?
1. CloseMainWindow 2. Kill
3. Close 4. Dispose

40. We create an ASP.NET application for a hotel. The application contains a page that displays
current weather conditions for the city in which the hotel is located. The application calls an XML
Web service every 5 minutes to update the current weather conditions. A new page is then
displayed for subsequent requests. We want the same page to be cached and retrieved from the
cache during the time between calls to the XML Webservice. We decide to use a Page directive
to accomplish this goal. Which page directive should We use?
1. <%@ Output Cache Duration=”300” VaryByParam=”None ” %>
2. <%@ Cache Seconds =”300” VaryByParam=”page ” %>
3. <%@ Out put Cache Duration=”300” %>
4. <%@ Output Cache Time =”300” %>
41. Which is the most appropriate place to install a Strong-Named assembly that is intended for
use among several web applications?
1. GAC on the local area network Primary Domain Controller (PDC) server
2. The solution's /bin directory
3. The Virtual Directory of the ASP.Net Web Application
4. The Global Assembly Cache on the Web Server
42. What is managed code
1. Code managed outside the IL 2. Code which can not be managed by
the IL
3. Code written in VB.NET 4. Code to be compiled by IL

43. A particular area of your .NET code is throwing an exception. However, this exception is
thrown during a data access operation and you want to find out more information about the
exact SQL error that is occurring. Which of the following exception class could you use?
1. ApplicationException 2. SqlException
3. IOException 4. Exception

44. Where would we save the following data items so that they persist between requests to a
web form?
a. A control created at run time
b. User preferences
1. A control created at run time=Viewstate User preferences=Application state
2. A control created at run time=SessionState User preferences=Context.Handler object
3. A control created at run time=Viewstate User preferences=SessionState
4. A control created at run time=Viewstate User preferences=Cookies

45. You are working on a financial web application project, in which you have to create a new
web page. This page should display details about a single credit transaction for a given person.
The details shown need to be in a tabular format and should only show a single record at a time.
Which control should you use?
1. ListView 2. GridView
3. DetailsView 4. FormView

46. We have written an ASP.NET application using C#, and we are ready to deploy it to a Web
server. We will use a Windows Installer Web setup project to create an installation routine.What
action must we perform so that a virtual directory named CdacPuneApp is created on the Web
server?
1. In our application’s Web.config file, crete a custom attribute with the value of CdacPuneApp
2. Change the name of the setup project to CdacPuneApp.
3. Create a merge module that will create the virtual directory.
4. Set the VirtualDirectory property of the Web Application folder in the setup project to
CdacPuneApp

47. You are working on an ASP.Net web application for a company. As a member of the
development team, it is your job to write ASP.Net code and test the web applications you are
developing.Developers are tasked with testing each individual function and block of code.
What is this type of testing called?
1. Unit testing 2. Integration testing
3. Regression testing 4. Load testing

48. How do you deterministically release unmanaged resources held by a reference object?
1. Use a Dispose method.
2. Let the garbage collector release the resources automatically.
3. Use a destructor.
4. Use a Finalize method.
49. How can we generate client-side proxy classes for a Web service?
1. Use a proxy tool such as the .NET WebService Studio tool.
2. Use the Web Services Description Language tool. And Set a Web reference to point to the
Web service.
3. Use the Web Services Discovery tool.
4. Both 1 and 3

50. In an Asp .Net web application, you have to display the sales data for your division for the
past 10 years in a DataGrid on a Web Form. Performance is very important. Which one is the
best strategy to use in retrieving the data?
1. Use a cached XML file as the data source and retrieve the data with a DataSet
2. Use a simple select statement as the data source for the DataGrid
3. Use a DataReader object to retrieve the data for the DataGrid
4. Use a DataSet object to retrieve the data for the DataGrid

51. We have created an ASP.NET Web service project that includes a class named RefLibrary.
The
RefLibrary class contains this method:
public String Version()
{
Version = “1.0.0.8”;
}
We are able to instantiate the RefLibrary class from a Web service client project, but the
Version()
method is not available. What could be the problem?
1. Only void methods can be part of the public interface of a Web service.
2. The methods of a Web service can return only Object data.
3. You must mark the method with the WebService attribute.
4. You must mark the method with the WebMethod attribute.
52. You have loaded several thousand records into a DataTable and want to filter those records
by LastName = ‘Sharma'. Which method of the
DataTable class should you use?
1. DisplayExpression 2. Locale
3. Select 4. Site

53. We are creating a custom exception named BusinessException for an application. Which
constructors should we implement for this class?
1. public MyOwnCustomException ()
2. public MyOwnCustomException (string message) : base(message)
3. public MyOwnCustomException(string message,Exception inner) : base(message, inner)
4. All of the above

54. You are creating a custom dictionary. The class name is CustomDir. You need to insure that
the dictionary is type safe. Which of the following code segment you should use?
1. Class CustomDir: CustomDir<string, string>
2. Class CustomDir: HashTable
3. Class CustomDir:ICustomDir
4. Class CustomDir{….} CustomDir<string, string>= new Dir<string, string>;
54. We want to use a Web service that supplies travel weather information in an application.
Now the URL of the .asmx file published by the Web service, but we do not know any details of
he Web service’s interface. What action should we take first?
1. Open the .asmx file in a Web browser.
2. Run the XML Schema Definition tool.
3. Run the Web Service Discovery tool.
4. Copy the .asmx file to your client project.

55. represent general languages without region-specific differences, such as


currency.
1. CurrentCulture property 2. CurrentUICulture property
3. neutral culture 4. None of the above

56. Which statement is the feature of indexers?


1. The return type of indexed properties can be void.
2. To provide the indexer with a name that other languages can use for the default indexed
property, use a name attribute in the declaration.
3. If you declare more than one indexer in the same class, they can have same signatures.
4. An indexer cannot be simulate as a multidimensional "virtual array."

57. We are creating an ASP.NET application for a company. Customers will use the application to
file claim forms online. We plan to deploy the application over multiple servers. We want to save
session state information to optimize performance. What is possible way to achieve this goal?
1. Modify the Web.config file to support InProc mode.
2. Modify the Web.config file to support StateServer mode or SQLServer mode.
3. In the Session_Start procedure in the Global.asax file, set the EnableSession property of the
WebMethod attribute to true.
4. None of the above

58. What can you do to adjust the default size at which InfoPath inserts sections?
1. Lessen the custom layout width setting in the View Properties dialog box.
2. Reduce the width setting for the section on the Display tab in the Section Properties dialog
box.
3. Increase the setting for the section on the Display tab in the Section Properties dialog box.
4. Nothing, but you can narrow the margins of your form to accommodate the sections.

59. We create an ASP.NET application to display a sorted list of products in a DataGrid control.
The product data is stored in a Microsoft SQL Server database named DatabaseDB. Each product
is identified by a numerical value named ProductID, and each product has an alphabetic
description named ProductName. We write ADO.NET code that uses a SqlDataAdapter object and
a SqlCommand object to retrieve the product data from the database by calling a stored
procedure. You set the CommandType property of the SqlCommand object to
CommandType.StoredProcedure. We set the CommandText property of the object to
procProductList. Our code successfully files a DataTable object with a list of products that is
sorted by
ProductID in descending order. We want to data to be displayed in reverse alphabetic order by
ProductName.
What should we do?
1. Set the DisplayExpression property of the DataTable object to "ORDER BY ProductName
DESC". Bind the DataGrid control to the DataTable object.
2. Set the AllowSorting property of the DataGrid control to True. Set the SortExpression
property of the
DataGridColumn that displays ProductName to "ProductName DESC". Bind the DataGrid control
to the DataTable object
3. Create a new DataView object based on the DataTable object. Set the Sort Property of the
DataView object to "ProductName DESC". Bind the DataGrid control to the DataView object.
4. Change the CommandType property setting of the SqlCommand object to
CommandType.Text.Change the
CommandText property setting of the SqlCommand object to the following: SELECT * FROM
procProductList ORDER BY ProductName DESC; Bind the DataGrid control to the DataTable
object.

60. What is a delegate?


1. Delegate is a light weight thread that can call a single method.
2. Delegate allows encapsulating a reference to a method inside a delegate object and it
must have arguments.
3. Delegate is a template for a method, that return type can be void.
4. Delegate allows encapsulating a reference to a method inside a delegate object and it
can have no arguments.

61. We are creating an ASP.NET application for a Company. An earlier version of the application
uses ActiveX components that are written in Visual Basic 6.0. The new ASP.NET application will
continue to use the ActiveX components.We want the marshaling of data between your ASP.NET
application and the ActiveX components to occur as quickly as possible. Which action should we
take?
1. Use late binding, Set the AspCompat attribute of the Page directive to false.
2. Use early binding,Set the AspCompat attribute of the Page directive to true .
3. Use ODBC binding. Set the AspCompat attribute of the Page directive to Enable.
4. None of the above

62. Which of the following is/are the features of MOSS 2007?


1. Report Center, Records Management
2. Search enhancements
3. Alternate authentication providers and Forms-based authentication
4. All of the above

63. Which of the following is/are way to pass data between tiers?
1. DataSet, DataReader 2. Custom classes, XML
3. Both 1 and 2 4. None of the above

64. Which of the following are predefined value types in C#?


1. int 2. object
3. string 4. none of the above

65. Which keyword ensures that one thread does not enter a critical section while another
thread is in the critical section of code?
1. stackalloc 2. synchronize
3. sealed 4. lock

65. Models in which multiple processes run on multiple CPUs in a single server machine are
known as a .
1. Web garden 2. Web farms
3. Web services 4. None of the above

66. Which of the following type of file(extension) can not be uploaded to share point web site?
1. .asp and .asa 2. .ida and .idc
3. .idq 4. All of the above

67. Which of the following code is used to sign out in forms authentication?
1. FormAuthentications.SignOut() 2.
FormsAuthentication.SignOut()
3. FormsAuthentications.SignOut() 4.
FormsAuthentication.Signout()

68. What is the extension for custom ASP .Net HTTP handlers?
1. .rem 2. .asmx
3. .ashm 4. .ascx

69. A char in C# is
1. 8 bit 2. 16 bit
3. 32 bit 4. 20 bit

70. What are the sequences in which ASP.Net events processed?


1. Page_Init, Control events, Page_Unload event
2. Page_Init, , Control events, Page_Load Page_Unload event
3. Page_Load, Page_Init, Control events, Page_Unload event
4. Page_Init, Page_Load, Control events, Page_Unload event
71. Why the collection class should implement the “System.Collections.IEnumerator” and
“System.Collections.IEnumerable” interfaces?
1. To iterate over the elements of a collection using foreach statement
2. To provide type-safety
3. To interoperate with other common language runtime-compatible languages
4. All of the above

72. Which of the following statement is/are false?


a. Finalize method of VB.NET implements the functionality same as Destructor in C#
b. VB support multiple inheritances.
1. Only a 2. Only b
3. Both a and b 4. None of the above
73. Which of the following statement is True?
1. We can use a sealed class as a base class.
2. Sealed modifier is used in a class declaration to prevent inheritance of the class.
3. It is permitted to use the abstract modifier with a sealed class.
4. Structs are not implicitly sealed.

74. If a method is marked as protected internal who can access it?


1. Internal methods can be only be called using reflection
2. Classes that are both in the same assembly and derived from the declaring class.
3. Classes within the same assembly, and classes derived from the declaring class.
4. Only methods that is in the same class as the method in question.

75. Which command creates the ‘MyLibrary.DLL’ file using ‘first.cs’ and ‘second.cs’ files?
1. csc /target:library /out:MyLibrary.DLL
second.cs first.cs
2. csc /target:DLL /out:MyLibrary.DLL
second.cs first.cs
3. csc /out:DLL /target:MyLibrary.DLL
second.cs first.cs
4. csc /out: library /target:MyLibrary.DLL
second.cs first.cs

76. Which of the following statement is true?


a. A module is invisible when its code is running.
b. Declarative calls are performed using attributes
1. Only a 2. Only b
3. Both a and b 4. None of the above
77. A developer must be familiar with which of the following code access security concepts in
order to write effective applications targeting the common language runtime?
1. Requesting permissions for your code
2. Imperative and declarative syntax
3. Writing type-safe code and Using secure class libraries
4. All of the above

78. Pick the command line that would result in the C# compiler generating an XML
documentation file:
1. csc /doc:HelloWorld.xml HelloWorld.cs
2. csc /doc /docfile:HelloWorld.xml HelloWorld.c
3. csc /doc /out:HelloWorld.xml HelloWorld.cs
4. csc /xml HelloWorld.cs

79. Which of the following is/are the main styles for Windows application UI?
1. Single-document, multiple-document interface 2. Explorer-style interface
3. Both 1 and 2 4. Sheet-style interface
80. Which namespace is used to perform binary serialization?
1. System.Runtime.Serialization.Formatters.Bin aryFormatter
2. System.Runtime.Serialization.Formatters.Binary
3. System.Runtime.Serialization.BinarySerialization
4. System.Runtime.Serialization.Formatters.Fo rmatter

80. Is the below statement true? The lifetime of the startup form is what determines the lifetime
of the application. It is NOT possible to separate the lifetime of the application from the lifetime
of the form.
1. True 2. False
3. Cannot say 4. Hard to determine
81. Which namespace is used to perform serialization with SOAP?
1. System.Runtime.Serialization.Formatters.Soap 2. System.Runtime.Serialization.Formatters.So
apFormatter
3. System.Runtime.Serialization.SoapSerialization
4. System.Runtime.Serialization.Formatters.Fo rmatter

82. Which of the following statement is true?


a. It is technically possible for you to specify the same property value for a group of controls.
b. When you add a Windows Form to a project, it will not display itself by default at run time.
1. Only a 2. Only b
3. Both a& b 4. None of the above
83. C# types are defined in , organized by , compiled into , and then grouped
into .
1. files, modules, namespaces, assemblies
2. files, namespaces, assemblies, modules
3. files, assemblies, namespaces, modules
4. files, namespaces, modules, assemblies
84. We create a Windows control that will display custom status bar information. Many different
developers in our company will use the control to display the same information in many different
applications. The control must always be displayed at the bottom of the parent form in every
application. It must always be as wide as the form. When the form is resized, the control should
be resized and repositioned accordingly. What should we do?
1. Place the following code segment in the
UserControl_Load event: Me.Dock = DockStyle.Bottom
2. Create a property to allow the developers to set the Dock property of the control. Set the
default value of the property to AnchorStyle.Bottom.
3. Place the following code segment in the UserControl_Load event: Me.Anchor =
AnchorStyle.Bottom
4. Create a property to allow the developer to set the Anchor property of the control. Set the
default value of the property to AnchorStyle.Bottom.

85. Which attribute is used to specify that the member field of the class is not serialized?
1. [NotSerialized] 2. [Transient]
3. [Transitory] 4. [NonSerialized]

86. We develop a Windows-based application for tracking telephone calls. The application stores
and retrieves data by using a Microsoft SQL Server database. We will use the SQL Client
managed provider to connect and send commands to the database. We use integrated security
to authenticate users. Our server is called CallCenter10 and the database name is
CustomerService. We need to set the connection string property of the SQL Connection object.
Which code segment is more suitable?
1. "Data Source=CallCenter10; Initial Catalog=Master"
2. "Data Source=CallCenter10; Initial Catalog=CustomerService"
3. "Provider=SQLOLEDB.1;Data Source=CallCenter10; Initial Catalog=CustomerService"
4. "Provider=MSDASQL;Data Source=CallCenter10; Initial Catalog=CustomerService"
87. Look at the statement below. What is a type of names?
foreach (string name in names)
{
strNames+=name;
}
1. An one-dimensional array of strings 2. ArrayList.
3. string. 4. Both 1 and 2

88. We develop a Windows-based application by using Visual Studio .NET. Our application
receives XML data files from various external suppliers. An XML Schema file defines the format
and the data types for the XML data files. Our application must parse the incoming XML data
files to ensure that they conform to the schema. What should we do?
1. Implement an XmlValidatingReader object and code an event handler to process its events.
2. Implement an XmlValidatingWriter object and code an event handler to process its events.
3. Implement a DataAdaptor object and set its Enforce Constraints property to True.
4. Implement a DataAdaptor object and set its Enforce Constraints property to false.

89. Which attribute makes the program thread safe for COM?
1. [SAFEThread] 2. [STAThread]
3. [SThread] 4. [Obsolete]

90. What is frx?


1. It is extension of form in VB.NET.
2. It is extension of web services.
3. When some controls like grid placed in our application then it will create frx in run time.
4. When some from added some custom control then it will create frx in run time.
91. Which keyword is used to compare two objects and what is the return type of it?
1. ISOperator – return type is Bit
2. ISOperator – return type is Boolean
3. CompareOperator – return type is Bit
4. CompareOperator – return type is Boolean
92. Which of the following is true for a special member of the class namely ‘this’?
1. ‘this’ cannot be used in a static method
2. ‘this’ cannot be used in a class A to access a member of class B
3. The ‘this’ member can never be declared: it is automatically implied when you create a class
4. All the above are correct
93. Choose the correct pair:
1. Set a. Value is assigned to ActiveX Object from the form.
2. Let b. Value is retried to ActiveX Object from the form.
3. Get c. Assign the value of an expression to variable or property.
1. 1-a, 2-b, 3-c 2. 1-b, 2-c, 3-a
3. 1-c, 2-a, 2-b 4. None of the above

94. Within a form we want to check that all text box control are typed or not. Which one of the
following code is useful for this?
1. For each currentcontrol in controls if typed currentcontrol is TextBox then endif next
2. For each currentcontrol in controls if typeof currentcontrol is TextBox then endif next
3. For each currentcontrol in controls if typeis currentcontrol is TextBox then endif next
4. It is not possible

95. What is the difference between Array and ArrayList Classes?


1. Array is a standard array whereas ArrayList is a collection of arrays
2. Array is a fixed array whereas ArrayList is a dynamic array
3. Array can be resized whereas ArrayList cant' be resized
4. Both are same

96. How is .NET able to support multiple languages?


1. Because of CLR 2. Because of CTS
3. Because of MSIL 4. All of the above

97. Number of MDI form in a VB.NET project may be .


1. Only one 2. Only 64
3. Only 128 4. Only 256

98. Which is true about lambda expression in LINQ?


1. It is a function without name that calculates and returns a single value.
2. It uses the Lambda operator =>
3. The left side of the lambda operator specifies the input parameters and the right side holds
the expression or statement block.
4. All of the above

99. What is out of process?


1. It will run out of RAM normally in hard disk.
2. It will run out of memory normally in server side.
3. It will run out of scope.
4. None of the above

100. Which on of the following is used for changing the Mouse pointer?
1. Screen.MousePointer = VBHourGlass/VBNormal 2. Display.MousePointer =
VBHourGlass/VBNormal
3. Pointer.MousePointer = VBHourGlass/VBNormal 4. Show.MousePointer =
VBHourGlass/VBNormal
101. What is the use of the CommnadBuilder class?
1. It is used to automatically update a database according to the changes made in DataSet.
2. It is used to build the dataset.
3. It is used for build a program.
4. It is a simple class, as we want we can use.

102. What is the purpose of the Hit Count property for breakpoints?
1. It allows you to configure an expression that triggers the breakpoint.
2. It allows you to configure the number of times a breakpoint must be reached before it
executes.
3. It allows the creation of a file breakpoint.
4. It allows you to view detailed statistics regarding the number of times a breakpoint has been
reached.
103. In Vb.net, abstract class is specified using the keyword
1. MustInherit 2. Abstract
3. Inherit 4. MustOverride

104. You would like to return to several articles that you have located in the Visual Studio .NET
Help files. What is an easy way to configure this?
1. Save the files as text files and store them on your local hard drive.
2. Use the Bookmark feature of the Visual Studio .NET IDE.
3. Add the articles to your list of Favorites.
4. Add the articles to the Recent Documents area.
105. Which is true about lambda expression in LINQ?
1. It is a function without name that calculates and returns a single value.
2. It uses the Lambda operator =>
3. The left side of the lambda operator specifies the input parameters and the right side holds
the expression or statement block.

106. All of the above


62. What is the value of C1.I1 after the following code is executed?
Dim C1 as New MyClass
Dim C2 as MyClass = C1
C1.I1 = 2
C2.I1 += 1
1. 1 2. 2
3. 3 4. Compilation error
107. In vb.net, for declaring an event signature, what keyword must use?
1. Signature 2. Eref
3. Event 4. Declare

108. Which of the following property of control is with respect to the position i.e. X,Y value
1. Anchor 2. Docking
3. Text Allign 4. All of the above
109. What is the work of JIT compiler in .NET framework?
1. It complies the assemblies.
2. It translates the code in the machine language.
3. It translates the MSIL code of assembly and uses the CPU architecture of the machine to
execute a .NET application.
4. It translates the assembly code of MSIL and uses the CPU architecture of the machine to
execute a .NET application.

110. Given the following overloaded method


Public Sub New()
Public Sub New(ByVal FirstName as String, ByVal
LastName as String)
Which of the following additional overloaded methods is not valid?
1. Public Sub New(ByVal FirstName as String, ByVal LastName as String, BirthDate as Date)
2. Public Sub New(ByVal LastName as String, ByVal FirstName as String, BirthDate as Date)
3. Public Sub New(ByVal FirstName as String, ByVal LastName as String, BirthDate as Date)
4. Public Sub New(ByVal LastName as String)
111. Which of the following debugging tools come with the .NET SDK?
1. CorDbg 2. CLRDbg
3. MsiDbg 4. None of the above

112. In the following code, what is the base class? Public Class Customer Inherits Company
Public oContact as Contact End Class
1. Company 2. Customer
3. Contact 4. None of the above

113. How do you write the schema of a Dataset to XML


1. Dataset.WriteXML 2. Dataset.AddxmlSchema
3. Dataset.Writexmlschema 4. None of the above

114. performs the necessary conversions in data formats between managed and
unmanaged code.
1. Marshaling 2. CLR
3. . Net framework 4. CTS

115. What is the significance of shadowing a method inVB.Net?


1. It makes a method Overridable
2. It makes a method not inheritable
3. It replaces all the implementation from higher class in the inheritance chain
4. None of the above

116. What is the use of assert function?


1. Assert takes in a Boolean condition as a parameter, and shows the error dialog if the
condition is true. The program proceeds without any interruption if the condition is false.
2. Assert shows the error dialog if the condition is false. The program proceeds without any
interruption if the condition is true.
3. Assert shows the error dialog if the condition is true. The program proceeds without any
interruption if the condition is false.
4. Assert takes in a Boolean condition as a parameter, and shows the error dialog if the
condition is false. The program proceeds without any interruption if the condition is true.
Which statement is used to replace multiple if
statement in code?
1. Select – Case 2. Switch – Case
3. Both 1 and 2 4. None of the above

117. Which is the top most .NET class from everything is derived?
1. System.Class 2. System.All
3. System.Object 4. It is not possible

118. Benefit of .NET framework is/are .


1. Consistent programming Model 2. Language Interoperability
3. Automatic management of resources 4. All of the above

119. What is the method of sorting the elements of the array in descending order?
1. By calling Desc() method
2. By calling Sort() and then Reverse() methods
3. By calling Sort() and then calling Desc() method
4. By calling Reverse() method inside Sort() method
119. What class is underneath the SortedList class?
1. A un sorted HashTable 2. A sorted HashTable
3. A sorted ArrayList 4. A un sorted ArrayList

120. What is/are the different way of overloading a method?


1. Different parameter data types 2. Different number of
parameters
3. Different order of parameters 4. All of the above

121. What is the difference between the Debug class and Trace class?
1. Use Debug class for debug builds; use Trace class for release builds.
2. Use Debug class for release builds; use Trace class for debug builds.
3. Use Debug class for debug builds, use Trace class for both debug and release builds.
4. Use Debug and Trace class for both debug and release builds.

122. How can I autosize a button to fit its text?


1. By writing a autosize function 2. By writing a property
3. By changing autosize property of button 4. By all mention way

123. What is a pre-requisite for connection pooling?


1. Multiple processes must agree that they will share the same connection
2. Where every parameter is the same
3. Security settings must be same
4. All of the above

124. What do you mean by 'Option Strict On’?


1. Which will restrict the explicit type casting
2. Which will restrict the implicit type casting
3. Both 1 and 2
4. None of the above

125. Why would you use un trusted verification?


1. Web Services might use it, as well as non- Windows applications.
2. Web Services might use it, as well as Windows applications.
3. Both Windows and non- Windows application.
4. Only Web Services

126. Can you change the value of a variable while debugging a C# application?
1. No, it is not possible.
2. Yes, if you are debugging via Visual Studio. NET, just go to immediate window.
3. Yes, if you are debugging via Visual Studio. NET, just go to output window.
4. Yes, if you are debugging via Visual Studio. NET, just go to debug window.

127. What namespaces are necessary to create a localized application?


1. System.Globalization 2. System.Resources
3. Both 1 and 2 4. All of the above

128. In our application we are getting an IOException during execution. To solve this problem
we create two additional subroutines named ShowError and CleanUp. These subroutines have to
following rules:
• ShowError must be called only when application raises an exception.
• CleanUp must be called whenever application is complete.
So which of the following approach is right?
1. try {
application();
ShowError();
}
catch (Exception e) {
CleanUp(e);
}
2. try {
application();
}
catch (Exception e) {
ShowError(e);
CleanUp();
}
3. try {
application();
}
catch (Exception e) {
ShowError(e);
}
finally {
CleanUp();
}
4. try {
application();
}
catch (Exception e) {
CleanUp(e);
}
finally {
ShowError();

78. An application reads from and writes to log files located on the local network. The original
programmer included the following debugging code for maintenance:
try {
Debug.WriteLine(“Inside Try”);
throw(new IOException());}
catch (IOException e) {
Debug.WriteLine (“IOException Caught”);}
catch (Exception e) {
Debug.WriteLine(“Exception Caught”);}
finally {
Debug.WriteLine (“Inside Finally”);}
Debug.WriteLine (“After End Try”);
Which output is produced by this code?
1. Inside Try Exception Caught IOException Caught Inside Finally After End Try
2. Inside Try Exception Caught Inside Finally After End Try
3. Inside Try IOException Caught Inside Finally After End Try
4. Inside Try IOException Caught Inside Finally

129. is used for situations in which we want to pass methods around to other
methods.
1. Indexers 2. Delegates
3. Events 4. All of the above

130. Which of the following is alternative of destructor method?


1. IDisposable 2. Finally
3. Disposable 4. IDispose
131. Web Services are .
1. Programmable business logic component 2. Provide access to functionality
through the internet
3. Based on SOAP, which is an application of XML 4. All of the above

132. What is SOAP?


1. It is a binary-based protocol for exchanging structured information between systems.
2. It is an XML-based protocol for exchanging structured information between systems.
3. It is a discovery service for Web services. It is a set of XML messages.
4. Used to discover the URLs of XML Web services located on a Web server.

134. Which preprocessor directives are used to mark that contain block of code is to be treated
as a single block?
1. # Define and #undefine 2. #Line
3. # Region and #EndRegion 4. # Block and #EndBlock
135. Which of the following is true?
1. User controls are displayed correctly in the Visual Studio .NET Designer
2. Custom controls are displayed correctly in VS.Net Designer
3. User and Custom controls are displayed correctly in the Visual Studio .NET Designer.
4. None of the above

136. How can I run a .EXE from a VB.NET application?


1. using System.Diagnostics namespace 2. using System
3. not possible 4. None of the above

137. What is the difference between .DLL extension and .exe extension files?
a. .EXE itself executable which is an application and .DLL is a library and we can reuse it.
b. .DLL is the In process component and .EXE is the Out of process component
1. a 2. b
3. None of the above 4. Both a and b

138. How would you get tab character inside textbox.


1. Set AcceptTab and MultiLine Property to true 2. Set TabIndex Property to 1
3. Set TabStop Property to false 4. Set AcceptTab Property to
true

139. Can we have protected element as a namespace member?


Eg namespace mynamesp
{
protected class myclass
{
}
}
1. Yes, all access specifiers are valid for namespace members.
2. No, only private access specifiers are possible
3. No, implicitly all members are protected
4. No, the namespace allows only public and internal elements as its members

140. A developer develops a Windows-based application application1 by using VS.NET.The


application includes numerous method calls at startup.After optimizing application code,he test
the application on variety of client computers.However,the startup time is too slow. You must
ensure that this application starts as
quickly as possible the first time it runs. What should he do?
1. Precompile your application by using the Native Image Generator(Ngen.exe): Install the
precompiled application on the client computers.
2. Install your application on the client computers. Precompile your application by using the
Native Image Generator(Ngen.exe).
3. Precompile your application by using the JIT compiler. Install the precompiled application
on the client computers.
4. Install your application on the client computers. Precompile your application by using the JIT
compiler.

141. How can we describe “Encapsulation”?


1. The separation of interface and implementation.
2. The conversion of one type of object to another.
3. The runtime resolution of method calls.
4. The exposition of data.

142. Which attribute must adorn a test class in order for it to be picked up by the NUnit GUI in
NUnit test
framework?
1. TestAttribute 2. TestFixtureAttribute
3. TestClassAttribute 4. NUnitTestClassAttribute

143. Which of the following is true about DataSet?


1. A DataSet can represent an entire relational database in memory, complete with tables,
relations, and views.
2. There is no concept of cursor types in a DataSet.
3. DataSet have no current record pointer you can use For Each loops to move through the data.
4. All of the above

143. Where the DataSet is stored?1. RAM


1. Session 2. Memory
3. It depends on the Database

144. Which of following is\are the major differences between “DataSet” and “DataReader”?
1. DataSet is a disconnected architecture, while DataReader has live connection while reading
data.
2. When application needs to access data from more than one table DataSet forms the best
choice.
3. If we need to move back while reading records, DataReader does not support this
functionality.
4. All of the above

145. Stored Procedures are invoked using:


1. SQLConnection and ExecuteReader method
2. SQLCommand object and ExecuteNonQuery
3. SQLCommand object and ExecuteReader method
4. SQLParameter object and Execute method

146. If we want to revert or abandon all changes since the dataset was loaded use .
1. GetChanges 2. HasChanges
3. RejectChanges 4. All of the above
147. Which of the following is the standard column type in the DataGrid?
1. TemplateColumn 2. ButtonColumn
3. BoundColumn 4. HyperLinkColumn

148. What is true about Dataset.Clone and Dataset.Copy?


1. Clone only copies structure, does not copy data but copy Copies both structure and data.
2. Clone Copies both structure and data but copy only copies structure, does not copy data.
3. Both are same
4. We cannot differentiate like this.

149. Which one of the following return value in number of records affected?
1. ExecuteXmlReader() 2. ExecuteNonQuery()
3. ExecuteReader() 4. ExecuteScaler()

150. Which one of the following method executes the command and returns a typed data object,
depending on the provider in use.
1. ExecuteNonQuery() 2. ExecuteXmlReader()
3. ExecuteReader() 4. All of the above

151. What is the Correct way to define a static event ‘change’ with the delegate named as
‘delChange’?

1. public static event delChange change; 2. public static event change


delChange;
3. public static delegate delChange event change; 4. public static delChange event
change;

152. Which of the following is true about ADO and ADO.Net?


1. In ADO we had client and server side cursors they are no more present in ADO.Net.
2. Locking is supported in both ADO and ADO.Net.
3. In ADO data is persisted in Binary format and in ADO.Net data is persisted in ASCII format.
4. All of the above is true

1. System.Web.UI namespace contain which class?


a).web control
b).HTML control
c).Both
d).none

2. Which is code render block?


a).<script runat=”server”></script>
b).</*…*/>
c).<%--…--%>
d)<%=…%>
3. How we can include language in .aspx page?
a).<%@ Page Language=”C#”%>
b). <%@ language=”vb”%>
c)None
d).Both

4. where we are declare our directive?


a).Top
b).Bottom
c).middle
d).all of the above

5. In which keyword we are using for including namespace in our .aspx page?
a).using
b) namespace
c) Import
d) all of the above

7 Merge more then one server and make large server it is called…
a)internate
b) web services
c) web farm
d) none

8 Which configuration file is global configuration file …


a)module.config
b)machine.config
c)server.config
d)non of these

9 In which application you can use the file define global variable and that can be access from any
web page in web application.
a).aspx file
b)web.config file
c)global.asax file
d).cs file

10 In server side comment which syntax is used…


a)<% %>
b)<%= %>
c)<% -----%>
d)non of above

11 Which protocol is stateless protocol?


a)HTML
b)FTP
c)IP
d)HTTP

12 Which is store small amount of data that is store text file on the client system.
a)session state
b) application state
c) cookies
d) none of these

13 Which is store state on server side?


a)query string
b) hidden fields
c) view state
d) application state

14 The information that is appended to the end of the page URL that is called…
a)control state
b) session state
c) query string
d) view state

15 Which mathod is used when cancel the current session?


a)session_end()
b) Abandon()
c)remove()
d)clear()

16. which is the login control?


a).login
b).Registration forms
c). a&b
d).none

17. which control understand web browser?


a).HTML control
b).Web control.
c) a&b
d).none

18. How we are access the previous pages control?


a).Request.Form
b).Request.QueryString
c).PriviousPage.control
d).none

19. which is not rich control?


a).wizard control
b).Grid view
c).details view
d).panel control

20. which is the list control?


a).Datalist
b).detailview
c).CheckboxList
d).all of the above

2 1 Which control is does not support any of the formatting propery?


a)label control
b) textbox control
c) literal control
d) button control

22) In image button control image is not display so text is display which property is use?
a)Text
b)AlternateText
c)CommandText
d)non of these

23) In which hotspot X and Y co-ordinates are set…


a)RectangularHotspot
b)CircleHotspot
c)polygonHotspot
d)none
24) Which tag is used to displaying image on the screen?
a)<Image>
b) <ImageMap>
c) <Img>
d) none of these

25) If you set the GroupingText property,however ,the panel control render a which tag?
a)<field>
b)fieldgroup
c)fieldset
d)none of these

26) Which validator control is check a users entry is between specified lower and upper boundaries.
a)CustomValidator
b)CompareValidator
c)RangeValidator
d)none

27) The default validation display property is…


a)dynamic
b) static
c) none

28) The error message appears next to the control which display method is use…
a)summary
b)inline
c)custom
d)none

29) Matches nondigit character which regularexpression is used…


a)\W
b)\w
c)\D
d)\d

30) if you want to allow multiple valid pattern, use which validator to separate expression.
a) ()
b)*
c)?
d) |

38) The FileUpload default size limit is…


a) 4 MB
b) 3 MB
c) 2 MB
d) 1 MB

39) Which calendar control event is used to customize individual day in a calendar web server
control.
a)VisibleMonthChanged
b)SelectionChanged
c)DayRender
d)none

40) In Adrotator Control filter advertisement by a single keyword which property use…
a)Target
b) AlternateTextField
c) Keyword
d) none

42)ADO was designed for…


a)client server
b)client
c)server
d)none of these

44)A local copy of relevant portion of the database is called…


a) Dataset
b) DataProvider
c)DataAdapterd)none

48. In web service save with which extention?


a).aspx
b).asmx
c).asax,
d).config

49. which derective is used in webservice?


a).@ WebService
b).@ page
c).both
d).none

50. which language is used in webservice?


a).c#
b).vb
c).js
d)all of the above

51. SOAP is used with?


a).HTTP
b).SMTP
c).FTP
d)all of the above
52. WSDL is developed by:
a).Microsoft
b).IBM
c)sun
d).a&b
53) Which Parameter is represents the value of an HTML form field?
a)ProfileParameter
b)FormParameter
c)ControlParameter
d)none

54) ASP.Net site navigation in which data source control is use…


a)SQLDataSource
b)XmlDataSource
c)SiteMapDataSource
d)none
56) Which is last stage of the server control lifecycle…
a)Load
b)Deleted
c)Updated
d)Disposed
57) Which parameter is represent the value of browser cookie?
a)FormParameter
b)ControlParameter
c)CookieParameter
d)none
59) Which DisplayMode property is rendered as a link to another page?
a)LinkButton
b)Text
c)HyperLink
d)none
60) Determine whether the check box are displayed in HTML table which property is set…
a)RepeatDirection
b)RepeatColumns
c)RepeatLayout
d)none

62)Display single data item in an HTML table Which control is used…


a)GridView
b)DataList
c)DetailsView
d)none

63. Which is not a tag?


a).configuration
b).configSections
c)configSection
d)section
64. which method through we can display trace message?
a).Write()
b).Warn()
c).none
d).a& b
65. which file is used to view the content of the trace log?
a).trace.asax
b).trace.asx
c).trace.asmx
d)trace.axd
66. how many types of authentication?
a).3
b).2
c)5
d).7
67. In compilation section which is the default language?
a).c#
b).vb
c).j#
d).xml
68) The highest level machine-level configuration file is…
a)global level
b) Machine level
c) web level
d)none
69) The configuration section handler declaration part contain within…
a)<configsections></configsections>
b)<configuration></configuration>
c)<config></config>
d)none
70) The actual configuration section is in…
a)System.data
b)System.web
c)System.config
d)none
71) Which section contain all the compilation setting used by ASP.NET.
a)<compile>
b)<compilation>
c)<Compiling>
d)none
73) by default Timeout time is…
a) 20 minute
b) 30 minute
c) 10 minute
d)none
74) XML support …
a)built in tag
b) user define tag
c) own tag
d) b&c
75) process of XML Document which namespace is include…
a)System.Xml
b)System.Data
c)System.IO
d)none
76) save the resulting XML document file which method is use…
a) SaveAs()
b) Add()
c) Save()
d)none
77) XML Specification developed by …
a)W2C XML
b) W3C XML
c) W3V XML
d) none
78) Which is a lightweight XML-based messaging protocol?
a)XML
b) HTTP
c)SOAP
d)WSDL
79. Asp.net framework compatible with which language?
A) C#
B) VB
c) J#
D) All
80. First Asp.net version (1.0 and 1.1) when comes?
A) 1994 to 1995
B) 1996 to 1998
c)2001 to 2003
D) 2004 to 2006
81. Asp.net which web server is used?
A) Apache
B) Tomcat
c)IIS
D) none
82. Which using we can develop asp.net application?
A) Notepad
B) Visual studio
c)Visual Web Developer
D) All of the above
85. Which property using we can fetch selected value in DropDownList?
A) SelectedValue
B) SelectedItem
c)SelectedIndex
D) All of the above
86. In validation control default value of Display property.
A) Dynamic
B) Static
c) None
87. Which of the below have IsValid Property.
A) CompareValidator
B) RegularExpressionValidator
c) Page
D) All of the above
88. Can RangeValidator Count TextLength.
A) Yes
B)No
89. CustomValidator which default event have
A) ServerValid
B) CustomValid
c) Validation
D)None
90. Below which is not State management option.
A) Session
B) HiddenField
c) Application
D)None
91. ApplicationState which side state management option.
A) ServerSide
B) ClientSide
c)ApplicationLevel
D) None
92 .Session is identify by?
A) SessionId
B) Index
c)Name
D)All

93. Website have how many Global.asax file ?


A) 0
B) 1
c)2
D)3
94. Below which file using Asp.net fetch data?
A)abc.xml
B)abc.mdb
c) abc.mdf
D)All
96. Which is not property of HiddenField.
A) Text
B) Id
c) Value
D)EnableViewState
97. Which is Wrong DataControls.
A) GridView
B) DataList
c) DetailView
D)none
98. Default Session stored in.
A) SQL Server
B) StateServer
c) InProc
D)None

99. InValidationExpression \S matches


A) White Space
B) Single Value
c) NoneWhiteSpace
D) None
100. InValidationExpression \w matches
A) [0-9]
B) [a-z]
c)[A-Z]
D)All
101. InValidationExpression \W don’t matches
A) @
B) #
c) *
D)a
102. Which is Rich Control
A) RichTextBox
B) FileUpload
c) GridView
D)All Of the above
103. In DateTime Class Now is.
A)method
B)Property
c)Event
d) None
104. Which is not StateManagement option.
A) Session
B) QueryString
C)ControlState
D)None
105. Which property using we can create Persistence Cookie.
A)Expires
B)Persistence
C)CookieType
D) None
106. Below Which is ListControl.
a) DropDownList
B)LIstBox
c) RadioButtonList
D) All
107. which type of tag generate in back an label control?
a)<label>
b) <literal>
c)<span>
d)none of this
109. Asp server script are surrounded by delimiters, which?
a) <&>...</&>
b) <%...%>
c) <script>...</script>
d) <%>...</%>
110. The CancelButton property belongs to which object?
a.) Button
bb.) Form
c.c) Label
dd.) TextBox
e.) Timer
111. in bellow life cycle only one not a life cycle part?
a)preInit
b) Init
c) Load Viewstate
d) Load Save

112. Where does the view state store information?


a.) HTML source
b.) Text file
c.) URL
d.) Both a and b.
e.) All of the above.
113. Where do cookies store information?
a.) HTML source
b.) Text file
c.) URL
d.) Both a and b.
e.) All of the above.
114 Which server-side technique is available in ASP.NET?
a.) Application states
b.) Session states
c.) Database support
d.) Both a and b.
115. which method are used session destroy?
a)session.End()
b)session.Abandon()
c)session.destory()
d)none of this
116. What use in the website for adrotator control ?
a)To display web contain
b) To display advertisement
c) To display image info
118. Which type of object has the Generate Dataset method?
a.) Adapter object
b.) Connection object
c.) Database object
d.) Dataset object
119. Which is a property of the DataGrid control?
a.) DataMember
b.) DataSource
c.) DataQuery
d.) Both a and b.
121. The first record in a dataset has a position property of:
a.) zero.
b.) one.
c.) any value defined by the programmer.
d.) Both a and b.
122. Session variable is exposed through the
A) System.Web.HttpContext.Session
B) System.HttpContext.Session
C) System.Web.Http.Session
D) None
123. Which of these is not the rule in XML?
A.) All attributes of an element must be enclosed within quotes
B.) Tags should not overlap
C.) Tags are not case-sensitive
D.) Tags must be closed
124 _______ supplies standard extensible message format for communicating request and
response
A. HTTP
B. UDDI
C. SOAP
D. WSDL
125. Browsers support cookies of upto __ bytes?
A.20 byte
B.9640 byte
C.4096 byte
D.4040 byte

126. What is the transport protocol you use to call a Web service?
A. HTTP
B. SMTP
C. TCP
D. SOAP

127. Web.config file is used…


a) Configures the time that the server-side codebehind module is called
b) To store the global information and variable definitions for the application
c) To configure the web server
d) To configure the web browser
128. Which of the following is not supported for IIS?
A. Windows XP Professional
B. Windows XP Home
C. Windows 2003 Server
D. Windows 2000 Server
129. How to implement authentication via web.config?
A. Include the authentication element.
B. Include the authorization element.
C. Include the identity element.
D. Include the deny element.
130. Which is not a validation control?
A. Required Field Validator
B. Compare Validator
C. Error Validator
D. Regular Expression Validator
131. which type of tag generate in back an label control?
a)<label>
b) <literal>
c)<span>
d)none of this
133. Asp server script are surrounded by delimiters, which?
a) <&>...</&>
b) <%...%>
c) <script>...</script>
d) <%>...</%>

134. The CancelButton property belongs to which object?


a.) Button
bb.) Form
c.c) Label
dd.) TextBox
e.) Timer
135. in bellow life cycle only one not a life cycle part?
a)preInit
b) Init
c) Load Viewstate
d) Load Save

136. Where does the view state store information?


a.) HTML source
b.) Text file
c.) URL
d.) Both a and b.
e.) All of the above.
137. Where do cookies store information?
a.) HTML source
b.) Text file
c.) URL
d.) Both a and b.
e.) All of the above.
138. Which server-side technique is available in ASP.NET?
a.) Application states
b.) Session states
c.) Database support
d.) Both a and b.
139. which method are used session destroy?
a)session.End()
b)session.Abandon()
c)session.destory()
d)none of this
140. What use in the website for adrotator control ?
a)To display web contain
b) To display advertisement
c) To display image info

143. Which is a property of the DataGrid control?


a.) DataMember
b.) DataSource
c.) DataQuery
d.) Both a and b.
153. How to implement authentication via web.config?
A. Include the authentication element.
B. Include the authorization element.
C. Include the identity element.
D. Include the deny element.
154. Which is not a validation control?
A. Required Field Validator
B. Compare Validator
C. Error Validator
D. Regular Expression Validator

155 A project on which you are working calls for you to store small amount of frequently changing
information about a page on the client. For this project, security is not a worry. Which is the best
method to use?
A) A cookie
B) A query string
C) A url
D) A javascript function
E) A hidden form field

156 What is the last stage of the Web forms lifecycle?


A) Event Handling
B) Page_Load
C) Validate
D) Page_Unload
E) Page_Init

157 How does ASP.NET store SessionIDs by default?


A) In cache
B) In cookies
C) In a global variable
D) In URL strings or in a database

158 Do I need IIS to develop a Web application in ASP.NET 2.0?


A) Yes
B) No

159 What namespace does the Web page belong in the .NET Framework class hierarchy?
A) System.Web.Control
B) System.Web.RootBuilder
C) System.Web.UserControl
D) System.Web.UI.Page

160Where would you define application and session level events?


A) Global.asax
B) Default.aspx
C) Web.Config
D) General.aspx
E) HttpModule.cs

161 What attribute must be set on a validator control for the validation to work?
A) Validate
B) ValidateControl
C) ControlToBind
D) ControlToValidate

162 Which of the following contains web application settings?


A) app.config
B) web.config
C) assembly.config
D) machine.config
E) None of these

164 In Which Page Cycle All Controls Are Fully Loaded?


A) Page_Load()
B) Page_Init()
C) Page_Render()
D) Page_Unload()

165 What DataType is return in IsPostback property?


A) bit
B) Boolean
C) int
D) string

166 Which method do you invoke on the Data Adapter control to load your generated dataset?
A) Fill( )
B) Read( )
C) ExecuteQuery( )

167 Which of the following is not a valid statement in ASP.Net?


A) Server.Transfer(“SomePage.aspx”);
B) Response.Redirect(“SomePage.aspx”);
C) Server.Redirect(“SomePage.aspx”);
D) Server.Execute(“SomePage.aspx”);

168 How do you manage states in asp.net application


A) Session Objects
B) Application Objects
C) Viewstate
D) All of the above

169 Which data control does not exist in asp.net


A) GridView
B) DataList
C) Repeater
D) tableView
E) ListView

170 Which control would you use if you needed to make sure the values in two different controls
matched?
A) Required Field Validator
B) Custom Validator control
C) CompareValidator control
D) Regular expression validator Control
E) Class Validator Control

171 Which property on a Combo Box do you set with a column name, prior to setting the
DataSource, to display data in the combo box?
A) DataTextField property.
B) DataValueField Property
C) DataMember

172 Difference between response.redirect and server.transfer.


A) both are same
B) response.redirect will take you to another page with out round trip
C) server.transfer will take the round trip from server to client
D) all the above
E) none of these

174 When will a session be started in an application?


A) Before Application Started
B) After Application Started
C) When the Client first sends a request to browser
D) While closing the application

175 Which control is used to sort the data and allow paging?
A) Datalist
B) Repeater Control
C) DataGrid

176 What is the Web.config file used for?


A) To store the global information and variable definitions for the application
B) Configures the time that the server-side codebehind module is called
C) To configure the web server
D) To configure the web browser

177 What is used to validate complex string patterns like an e-mail address?
A) Extended expressions
B) Regular expressions
C) Irregular expressions
D) Basic expressions

178 which namespace is used when we connect our asp.net page to sql server
A) System.data.sqlclient
B) System.data.sql
C) System.sqlserver
D) System.url
E) none of these

180 The process in which a web page sends data back to the same page on the server is called?
A) PostBack
B) Session
C) Query strings
D) All the above
Question
1. ASP.NET web page is implemented in a file with extension.

Answer Choices
A: .ashx
B: .asmx
C: .aspx
D: .asp
Answers : C

2. ASP.NET separates the HTML output from program logic using a feature
named as
Answer Choices
A: Exception
B: Code-behind
C: Code-front
D: None of the above

Answers : B

3. Which of the following denote the web control associated with Table
control function of ASP.NET?
Answer Choices
A: DataList
B: ListBox
C: TableRow
D: All the Above
Answers : C

4. An alternate ways of diplaying text on web page using


A asp:label
B asp:listitem
C asp:button
D asp:text

ANSWER: A

5. How do you get information from a form that is submitted using "post"
method
A Request.QueryString
B Request.Form
C Rsponse.write
D Response.writeln

ANSWER: B
6) On which of the operating system below ASP.NET can run?

a) Windows XP Professional
b) Windows 2000
c) Both A) and B)-(ANS)
d) None of the Above

7) An organization has developed a web service in which the values of the forms
are
validated using ASP.NET application. Suppose this web service is got and used
by a
customer then in such a scenario which of the following is TRUE

a) Such a situation cannot happen at all


b) The customer must be having technology that run ASP.
c) The customer can run on any platform. (ANS)
d) None of the Above

8) Which of the following denote the web control associated with Table control
function of ASP.NET?

a) DataList
b) ListBox
c) TableRow (ANS)
d) All the Above

9) ASP.NET separates the HTML output from program logic using a feature named
as

a) Exception
b) Code-behind (ANS)
c) Code-front
d) None of the above

10) If a developer of ASP.NET defines style information in a common location.


Then
that location is called as

a) Master Page
b) Theme (ANS)
c) Customization
d) None of the Above

11) In ASP.NET if you want to allows page developers a way to specify static
connections in a content page then the class used is

a) WebPartManager
b) ProxyWebPartManager (ANS)
c) System.Activator
d) None of the Above

12) The feature in ASP.NET 2.0 that is used to fire a normal postback to a
different
page in the application is called

a) Theme
b) Cross Page Posting (ANS)
c) Code-front
d) None of the above

13) In ASP.NET if one uses Windows authentication the current request attaches
an
object called as

a) Serialization
b) WindowsPrincipal (ANS)
c) WindowDatset
d) None of the Above

14) The GridView control in ASP.NET has which of the following features

a) Automatic data binding


b) Automatic paging
c) Both A) and B) (ANS)
d) None of the above

15) If one uses ASP.NET configuration system to restrict access which of the
following is TRUE?

a) The access is restricted only to ASP.NET files (ANS)


b)The access is restricted only to static files and non-ASP.NET
resources.
c) Both A) and B)
d) None of the Above

16) Which of the following denote page code model in ASP.NET?

a) single-file
b) code-behind
c) Both A) and B) (ANS)
d) None of the above

17) Which of the following denote New Data-bound Controls used with ASP.NET

a) GridView
b) FormView
c) SqlDataSource
d) Both A) and B)
e) All the Above (ANS)

18) A developer wanted to achieve graphics in his display using ASP.NET. Which
of
the following web controls are available in ASP.NET to achieve the above?

a) Both A) and B)
b) LinkButton
c) AdRotator (ANS)
d) None of the Above

19) Forms based authentication is otherwise called in ASP.NET as Cookie


Authentication because Forms authentication uses cookies to allow applications
to
track users throughout their visit.

a) Windows Authentication
b) Passport Authentication
c) Cookie Authentication (ANS)
d) None of the Above

20) Which of the following object is used along with application object in
order to ensure that only process accessess a variable at a time

A Synchronize
B Synchronize()
C ThreadLock
D Lock()

ANSWER: B

21) Which of the following is the way to moniter the web application ?
A MMC Event viewers
B Performance logs
C Alerts Snap-ins
D ALL

ANSWER: D

22)
If a developer of ASP.NET defines style information in a common location.
Then that location is called as
Answer Choices
A: Master Page
B: Theme
C: Customization
D: None of the Above
answers : D

23)

In ASP.NET, Session. method cancels the current session.


Answer Choices
A: Refused
B: Stop
C: EndSession
D: Abandon

Answers : D

24) In ASP.NET if one uses Windows authentication the current request


attaches an
object called as
Answer Choices
A: Serialization
B: WindowsPrincipal
C: WindowDataset
D: None of the Above.

Answer : D

Q. NO. 25)
Question
Which of the following authentication is best suited for a corporate
network ?
A Windows
B Form
C User
D All

Difficulty Level Easy


ANSWER: A

26) Which of the following is true about session in ASP.NET?

a) Programmers has to take care of delete sessions after


configurable
timeout interval
b) ASP.NET automatically delete sessions after configurable
timeout
interval (ANS)

c) The default time interval is 5 minutes


d) None of the Above

27) In ASP.NET what does the following return


< %
Response.Write(System.Environment.WorkingSet.ToString())
% >

a) None of the Above


b) Gives Error
c) Return Null value
d) Gives the memory working set (ANS)

28) In ASP.NET if one wants to maintain session then which of the following is
used?

a) In-process storage
b) Microsoft SQL Server
c) Session State Service
d) All the Above (ANS)

29) I have an ASP.NET application. I have a page loaded from server memory. At
this
instance which of the following methods gets fired

a) Unload( )
b) Load()(ANS)
c) PreRender( )
d) None of the Above

30) Give one word: What model does ASP.NET request processing is based on
a) Bottom-up
b) Top-down
c) Waterfall
d) Pipeline

31) If in an ASP.NET application one want to create http handlers which of the
interface is used

a) None of the above


b) pipeline
c) Handler
d) IHttpHandlerFactory (ANS)

32) To set page title dynamically in ASP.NET which of the following is used?

a) None of the above

b) < sheet > section

c) < tail > section

d) < head > section (ANS)

33) In ASP.NET application the Global.asax file lie in which directory

a) Application
b) System
c) ROOT (ANS)
d) None of the Above

34) Which of the following can be used to debug .NET application?

a) Systems.Diagnostics classes

b) Runtime Debugger

c) Visual Studio .NET

d) All the Above (ANS)

35) Which of the following is used to write error message in event Log File?

a) System.Data

b) System.EnterpriseServices

c) System.Diagnostics (ANS)

d) None of the Above

36) Setting the following properties for object in ASP.NET results in


Response.Buffer = True Response.ExpiresAbsolute = Now().Subtract(New
TimeSpan(1, 0,
0, 0)) Response.Expires = 0 Response.CacheControl = "no-cache"

a) Avoid page to be cached (ANS)

b) Clears the buffer area


c) The session expires

d) None of the Above

37) Which of the following denote value that can be taken by Cache-Control of
ASP.NET?

a) Public

b) Private

c) no-cache

d) All the Above (ANS)

38) In ASP.NET if one wants to set the focus on a particular control

a) Call SETFOCUS

b) Call SETCONTROL

c) Call FOCUS method (ANS)

d) None of the above

39) The control used in ASP.NET to display information from data set but with
better formatting and editing behavior is

a) Panel

b) Button

c) DataList (ANS)

d) None of the Above

40) Which of the following languages can be used to write server side
scripting in
ASP.NET?

a) C# (ANS)

b) C

c) Visual Basic

41
The command-line tool generates code and map the LINQ to SQL
component.
Answer Choices
A: SqlMetal.exe
B: Sql.exe
C: MetalSql.exe
D: None of the above
Answer: A
42
Which assembly represents the core LINQ API?
Answer Choices
A: System.Data.dll
B: System.DataReader.dll
C: System.Query.dll
D: System.Linq.dll
Answers : C

43
0.0.0.0 IP Address is refered using?
Answer Choices
A: IPAddress.Any
B: IPAddress.First
C: IPAddress.All
D: IPAddress.Default
Answers: A

44
System.Net.Sockets. is used to connect to a TCP server.

Answer Choices
A: TcpListener

B: UdpClient

C: TcpClient

D: UdpListener

Answers : C

45

Which of the following is true about WPF application settings:


A. The Application Settings are read-only, they can only be written at
design
time.
B. The Application Settings are static, they can be written at
runtime time.
C. The Application Settings are dynamic, they can only be written
at design
time.
D. The Application Settings are read-only, they can only be
written at runtime.

Answer : A

46) The Following are the minimum requirement to run Asp.net pages
a) Java Virtual Machine

b) Common Language Runtime (ANS)

c) Windows explorer

47) When a .aspx page is requested from the web server, the out put will be
rendered
to browser in following format.

a) HTML (ANS)

b) XML

c) WML

48) What executable unit gets created when we build an ASP.Net application?

a) . DLL (ANS)

b) . EXE

c) . COM

49) The best way to delimit ASP.Net code from HTML code in your pages is by
using
tags.

a) < Body >

b) < Head >

c) < Script > (ANS)

50) The Asp.net server control, which provides an alternative way of displaying
text
on web page, is

a) < asp:label > (ANS)

b) < asp:listitem >

c) < asp:button >

51) asp:dropdownlist> tag replaces which of the HTML tags

a) < Option >

b) < Select > (ANS)

c) < List >

52) < asp : listitem > tag replaces which of the following HTML tags

a) < Option > (ANS)

b) < UL >

c) < List >


53) The first event to be triggered in an aspx page is
a) Page_Load()

b) Page_Init()(ANS)

c) Page_click()

54) Postback occurs in which of the following forms

a) Winforms

b) HTMLForms

c) Webforms (ANS)

55) what namespace does the Web page belong in the .NET Framework class
hierarchy?

a) System.web.UI.Page (ANS)

b) System.Windows.Page

c) System.Web.page

56) Which method do you invoke on the Data Adapter control to load your
generated
dataset

a) Fill ( ) (ANS)

b) ExecuteQuery ( )

c) Read ( )

57) How many configuration files can an ASP.NET projects have?

a) More Than One

b) One (ANS)

c) None

58) Can a dll run as stand alone application ?

a) No (ANS)

b) Yes

c) Sometimes we can make it by introducing some code

59) To add a custom control to a Web form we have to register with

a) TagPrefix

b) Name space of the dll that is referenced

c) Assemblyname
d) All of the above (ANS)

60) Custom Controls are derived from which of the classes

a) System.Web.UI.Customcontrols.Webcontrol

b) System.Web.UI.Customcontrol

c) System.Web.UI.Webcontrol (ANS)

61) What is the transport protocol used to call a webservice

a) HTTP

b) SOAP (ANS)

c) TCP

d) SMTP

62) How ASP.Net Different from ASP

a) Scripting is separated from the HTML, Code is interpreted


seperately

b) Scripting is separated from the HTML, Code is compiled as a


DLL,
the DLLs can be executed on server (ANS)

c) Code is separated from the HTML and interpreted Code is


interpreted
separately

63) What’s the difference between Response.Write()


andResponse.Output.Write()?

a) Response.Output.Write() allows you to flush output

b) Response.Output.Write() allows you to buffer output

c) Response.Output.Write() allows you to write formatted output


(ANS)

d) Response.Output.Write() allows you to stream output

64) Why is Global.asax is used

a) Implement application and session level events (ANS)

b) Declare Global variables

c) No use

65) What is the extension of a web user control file ?

a) .Asmx
b) . Ascx (ANS)
c) .Aspx

66) What is the default session out time

a) 20 Sec

b) 20 Min (ANS)

c) 1 hr

67) Which of the following is true ?

a) IsPostBack is a method of System.UI.Web.Page class

b) IsPostBack is a method of System.Web.UI.Page class

c) IsPostBack is a readonly property of System.Web.UI.Page class


(ANS)

68) How do you manage states in asp.net application

a) Session Objects
b) application Objects
c) Viewstate
d) Cookies
e) All of the above (ANS)

69) Select the caching type supported by ASP.Net

a) Output Caching

b) DataCaching

c) Both a & b (ANS)

d) None of the above

70) Where is the default Session data is stored in ASP.Net

a) InProcess (ANS)

b) StateServer
c) SQL Server
d) All of the above

71) How do you disable client side validation ?

a) Set the language property to C#


b) Set the Runat property to server
c) Set the ClientTarget property to Downlevel (ANS)
d) Set the inherits property to codeb

72) Select the validation control used for “PatternMatching―

a) FieldValidator
b) RegularExpressionValidator (ANS)
c) RangeValidator
d) PatternValidator

73) Which DLL translate XML to SQL in IIS

a) SQLISAPI.dll (ANS)

b) SQLXML.dll

c) LISXML.dll

d) SQLIIS.dll

74) What is the default authentication mode for IIS

a) Windows

b) Anonymous (ANS)

c) Basic Authentication

d) None

75) Which of the following is not a valid state management tool?

a) Querystate (ANS)

b) Hidden Form Field

c) Application State

d) Cookies

76) Select the control which does not have any visible interface

a) Datalist

b) DropdownList

c) Repeater (ANS)

d) Datagrid

77) How do you explicitly kill a users session ?

a) Session.Close ( )

b) Session.Discard ( )

c) Session.Abandon (ANS)

d) Session.End

78) Why do we use XMLSerializer class

a) Remoting

b) WebServices (ANS)
c) Xml documentary Files

79) What does Response.End will do?

a) It will stop the server process (ANS)

b) It will stop the client process

c) None of the above

80) Which control supports paging

a) Repeater

b) Datagrid (ANS)

c) Both

d) None

81) Where do you store the information about the user locale

a) System.user

b) System.web

c) System.Drawing

d) System.Web.UI.Page.Culture (ANS)

82) What is the purpose of code behind ?

a) To separate different sections of a page in to different files

b) To merge HTML layout and code in to One file

c) To separate HTML Layout and code to different file (ANS)

d) To ignore HTML usage

83) What is a satallite assembly ?

a) Any DLL file used by an EXE file.

b) An Assembly containing localized resources for another


assembly
(ANS)

c) None of the above

84) Which of the following is not a member of Response Object?

a) Clear

b) Write

c) Execute (ANS)

d) Flush
85) Which of the following is not a member of ADODBCommand object

a) ExecuteReader
b) ExecuteScalar
c) ExecuteStream
d) Open (ANS)
e) CommandText

86) Which method do you invoke on the DataAdapter control to load your
generated
dataset with data?

a) Load

b) Fill (ANS)

c) GetAll

d) None

87) How to open more than one datareader at a time

a) Use different datareader variable

b) Use different datareader and connection variable (ANS)

c) Can not be done

88) What is the advantage of Disconnected mode of ADO.Net in ASP.Net

a) Automatically dump data at client PC

b) Not necessary to connect with server

c) user data can update and retrieve in dataset and when


connection
connected, update values with server (ANS)

d) All of the above

89) Which objects is used to create foreign key between tables?

a) DataRelation (ANS)

b) DataRelationship

c) DataConstraint

d) Datakey

90) Which one of the following namespaces contains the definition for
IdbConnection

a) System.Data.Interfaces

b) System.Data.Common

c) System.Data (ANS)
d) System.Data.Connection

91) Select the Interface which provides Fast, connected forward-only access to
data

a) IdataRecord

b) Idatabase
c) IdataReader (ANS)

d) Irecorder

92) How do we Delete, Update, Select data in a Dataset

a) Using SQLDataAdapter (ANS)

b) Using SQLDataReader

c) Using SQLCommand

d) None

93) Which of the following is not a member of ConnectionObject

a) Execute (ANS)

b) EndTransaction

c) BeginTransaction

d) Open

94) Is it Possible to Serialize HashTable with XMLSerializer

a) Yes (ANS)

b) No

95) What is the Full Form of WSDL

a) Web System Description Language

b) Web Services Detail Language

c) Web Service Description Language (ANS)

d) None

96) What is the difference between Server.Transfer & Response.Redirect

a) No Difference

b) Server.Transfer needs a roundtrip, Response.Redirect does not

c) Response.Redirect needs roundtrip, Server.Transfer does not


(ANS)

d) Server.Transfer can transfer user between 2 applicaions

97) Which Language can Support SOAP


a) VB

b) JAVA

c) COBOL

d) All of the above (ANS)

98) What is the size of the session ID

a) 32 bit long string

b) 32 bit long double

c) 32 bit long character

d) 32 bit long integer (ANS)

99) Which of the following extension does a webservice file will have

a) .Asmx (ANS)

b) .Aspx

c) .Ascx

d) .Resx

100) What is a strong name?

a) Public Key

b) Private Key

c) Combination Of both Public,Private key and digital signature


(ANS)

101 type of templates are available in WPF..?


A. Data Templates
B. Control Templates
C. Item Panel Templates
D. All of the above

Answer : D

102
Question
For building workflow-based applications on Windows quickly, the WF
consists of:
A. Programming model
B. Workflow designer
C. Rules engine
D. All of the above

Answer : D
103
How many types of transport schemas are there in WCF?
A .HTTP, TCP
B. Peer network, IPC (Inter-Process Communication over named pipes)
C. MSMQ
D. All of the above

answer : D

104
Types of Contracts in WCF
A. Service Contracts
B. Fault Contracts
C. Only 1
D. Only 1 and 2

answer: D

105
Where we can host WCF services?
A. IIS
B. Self Hosting
C. WAS (Windows Activation Service)
D. All of the above.

answer: D

Q106
describes the data and operations exposed by a WCF service.
A. Contract
B. Channel
C. Binding
D. All of the aboave
answer : A

107
interfaces WPF to DirectX.

A . mscorlib.dll
B. milcore.dll
C. mscoree.dll
D. All of the above
answer : B

108
System.Data. provider is used for accessing MS Access database in
.NET.

A. SqlClient
B. OleDb
C. Odbc
D. All of the above
answer : B

109
TransactionScopeOption. always starts a transaction for a given
scope.

A. Suppress
B. Required
C. RequiresNew
D. All of the above

answer : C

110) What is the purpose of Reflection?

a) For Reading metadata at runtime (ANS)

b) For knowing version of assembly

c) For finding path of an assembly

111) Why is Global.asax is used for ?

a) To implement application & Session level events (ANS)

b) To store configuration information

c) To store styling information

d) None of the above

112) What is the lifespan for items stored in viewstate

a) Exists for the Life of the current page (ANS)

b) 20 mins

c) 2 mins

d) 2 sec

1113) What data types do a Rangevalidator supports

a) Integer

b) String

c) Date

d) All of the above (ANS)

114) Select the output of the statement < form method=post action=”test.aspx”>

a) Transfers all the form data to test.aspx with HTTP headers


(ANS)

b) Transfers all the form data to test.aspx with out HTTP headers

c) Calls post method on test.aspx


d) None of the above

115) Whats the significance of Request.MapPath( )

a) Maps the specified virtual path to a physical path (ANS)

b) Maps the specified absolute path to virtual path

c) None

116) What is the significance of Server .MapPath

a) Returns the physical file path that corresponds to virtual


specified path (ANS)

b) Returns the Virtual Path of the web folder

c) Maps the specified virtual path to Physical path

d) None

117) Which namespace allows us to formauthentication ?

a) System.Web.Ui.Forms.Security

b) System.Web.Security

c) System.Web.Configuration

c) System.Web.Services

118) Which method displays the custom control

a) The Prerender

b) Render (ANS)

c) Page_Load

d) Display

119) When is the user controls code is executed

a) After the webform loads (ANS)

b) After the page_init event of webform

c) Before Page_init event of web form

120) Client Sertificate is a collection of

a) Server

b) Response
c) Collection

d) Request (ANS)

121) What section of the config.Web file is used for storing a list of
authorized
users?
a) authorization (ANS)

b) authentication

c) securityPolicy

d) None

22) How do you add ASP.Net 3rd party component

a) By add/Remove items in the project menu

b) Add reference of dll file and place the code where ever
required
(ANS)

c) Cannot add 3rd party component to asp.net

123) The .NET Framework provides a runtime environment called

a) RMT

b) CLR (ANS)

c) RCT

d) RC

124) In ASP.NET in form page the object which contains the user name is

a) Page.User.Identity (ANS)

b) Page.User.IsInRole

c) Page.User.Name

d) None of the Above

125) Find the term: The .NET framework which provides automatic memory
management
using a technique called

a) Serialization

b) Garbage Collection (ANS)

c) Assemblies

d) Overriding

126) Which of the following denote ways to manage state in an ASP.Net


Application?
a) Session objects

b) Application objects

c) ViewState

d) All the Above (ANS)

127) What is the base class from which all Web forms inherit?

a) Master Page

b) Page Class (ANS)

c) Session Class

d) None of the Above


128) WSDL stands for

a) Web Server Description Language

b) Web Server Descriptor Language

c) Web Services Description Language (ANS)

d) Web Services Descriptor Language

129) Which of the following must be done in order to connect data from some
data
resource to Repeater control?

a) Set the DataSource property

b) Call the DataBind method

c) Both A) and B) (ANS)

d) None of the Above

130) Which of the following is FALSE?

a) ASP.NET applications run without a Web Server

b) ASP+ and ASP.NET refer to the same thing

c) ASP.NET is a major upgrade over ASP

d) None of the Above (ANS)

131) Which of the following transfer execution directly to another page?

a) Server.Transfer (ANS)

b) Response.Redirect

c) Both A) and B)

d) None of the Above

132) If one has two different web form controls in a application and if one
wanted
to know whether the values in the above two different web form control match
what
control must be used?

a) DataList

b) GridView

c) CompareValidator (ANS)

d) Listview

133) Which of the following is used to send email message from my ASP.NET page?

a) System.Web.Mail.MailMessage
b) System.Web.Mail.SmtpMail
c) Both A) and B) (ANS)
d) None of the Above
134) In my .NET Framework I have threads. Which of the following denote the
possible
priority level for the threads?

a) Normal

b) AboveNormal

c) Highest

d) All the Above (ANS)

135) GIVE ONE WORD: In .NET the operation of reading metadata and using its
contents
is known as

a) Reflection (ANS)

b) Enumeration

c) Binding

d) Serialization

136) In ASP.NET the < authorization > section contain which of the following
elements

a) Both A) and B) (ANS)

b) < deny >

c) < allow >

d) None of the Above

137) Suppose one wants to modify a SOAP message in a SOAP extension then how
this
can be achieved. Choose the correct option from below:

a) One must override the method ReceiveMessage (ANS)

b) One must override the method InitializeMethod


c) Both A) and B)

d) One must override the method ProcessMessage

138) Which of the following can be used to add alternating color scheme in a
Repeater control?

a) AlternatingItemTemplate (ANS)

b) DataSource

c) ColorValidator

d) None of the Above

139) Suppose a .NET programmer wants to convert an object into a stream of


bytes
then the process is called

a) Serialization (ANS)

b) Threading

c) RCW

d) AppDomain

140) The technique that allow code to make function calls to .NET applications
on
other processes and on other machines is

a) .NET Threading

b) .NET Remoting (ANS)

c) .NET RMT

d) None of the above

141) The namespace within the Microsoft .NET framework which provides the
functionality to implement transaction processing is

a) System.EnterpriseServices (ANS)

b) System.Security

c) System.Diagnostics

d) System.Data

142) Which of the following method is used to obtain details about information
types
of assembly?

a) GetTypes
b) GetType

c) Both A) and B) (ANS)

d) None of the Above

143) In ASP.NET the sessions can be dumped by using


a) Session.Dump
b) Session.Abandon (ANS)
c) Session.Exit
d) None of the Above

144) Which of the following is TRUE about Windows Authentication in ASP.NET?

a) Automatically determines role membership (ANS)


b) Role membership determined only by user programming
c) ASP.NET does not support Windows Authentication
d) None of the Above

145) Which method do you invoke on the DataAdapter control to load your
generated
dataset with data?)

a) Load ( )
b) Fill( ) (ANS)
c) DataList
d) DataBind

146) What tags one need to add within the asp:datagrid tags to bind columns
manually?

a) Set AutoGenerateColumns Property to false on the datagrid tag


(ANS)

b) Set AutoGenerateColumns Property to true on the datagrid tag

c) It is not possible to do the operation

d) Set AutomaunalColumns Property to true on the datagrid tag

147) How many classes can a single .NET DLL contain?

a) One
b) Two
c) None
d) Many (ANS)

148) Which of the following denote the property in every validation control?

a) ControlToValidate property
b) Text property
c) Both A) and B) (ANS)
d) None of the Above

149) Which of the following allow writing formatted output?


a) Response.Write()
b) Response.Output.Write()(ANS)
c) Both A) and B)
d) None of the Above
150) The actual work process of ASP.NET is taken care by

a) inetinfo.exe
b) aspnet_isapi.dll
c) aspnet_wp.exe (ANS)
d) None of the Above

151) The type of code found in Code-Behind class is

a) Server-side code (ANS)


b) Client-side code
c) Both A) and B)
d) None of the above

152) Give One word: Common type system is built into which of the following:

a) CLR (ANS)
b) RCT
c) RCW
d) GAC

c) RCW

d) AppDomain

140) The technique that allow code to make function calls to .NET applications
on
other processes and on other machines is

a) .NET Threading
b) .NET Remoting (ANS)
c) .NET RMT
d) None of the above

141) The namespace within the Microsoft .NET framework which provides the
functionality to implement transaction processing is

a) System.EnterpriseServices (ANS)

b) System.Security

c) System.Diagnostics

d) System.Data

142) Which of the following method is used to obtain details about information
types
of assembly?
a) GetTypes

b) GetType

c) Both A) and B) (ANS)

d) None of the Above

143) In ASP.NET the sessions can be dumped by using


a) Session.Dump
b) Session.Abandon (ANS)
c) Session.Exit
d) None of the Above

144) Which of the following is TRUE about Windows Authentication in ASP.NET?

a) Automatically determines role membership (ANS)


b) Role membership determined only by user programming
c) ASP.NET does not support Windows Authentication
d) None of the Above

145) Which method do you invoke on the DataAdapter control to load your
generated
dataset with data?)

a) Load ( )
b) Fill( ) (ANS)
c) DataList
d) DataBind

146) What tags one need to add within the asp:datagrid tags to bind columns
manually?

a) Set AutoGenerateColumns Property to false on the datagrid tag


(ANS)

b) Set AutoGenerateColumns Property to true on the datagrid tag

c) It is not possible to do the operation

d) Set AutomaunalColumns Property to true on the datagrid tag

147) How many classes can a single .NET DLL contain?

a) One
b) Two
c) None
d) Many (ANS)

148) Which of the following denote the property in every validation control?

a) ControlToValidate property
b) Text property
c) Both A) and B) (ANS)
d) None of the Above

149) Which of the following allow writing formatted output?


a) Response.Write()
b) Response.Output.Write()(ANS)
c) Both A) and B)
d) None of the Above

150) The actual work process of ASP.NET is taken care by

a) inetinfo.exe
b) aspnet_isapi.dll
c) aspnet_wp.exe (ANS)
d) None of the Above
151) The type of code found in Code-Behind class is

a) Server-side code (ANS)


b) Client-side code
c) Both A) and B)
d) None of the above

152) Give One word: Common type system is built into which of the following:

a) CLR (ANS)
b) RCT
c) RCW
d) GAC

1. What is MSIL?

a. Multi Socket Interface Library


b. Microsoft Intermediate Language
c. Microsoft Interface Language
d. Microsoft Integer Long

2. Which is true for C#?

a. C# supports interfaces.
b. C# also provides support for structs.
c. C# provides component-oriented features
d. All

3. An assembly is?

a. A collection of files that appear to the programmer to be a single DLL or EXE.


b. 2. Properties of c#
c. Events of c#
d. Declarative syntax of Java

4. Which of the following is NOT a Bitwise operator in C#.NET?

a. &
b. <<
c. ~
d. |

5. Which of the following statements is correct about an interface used in C#.NET?

a. Properties can be declared inside an interface.


b. Interfaces cannot be inherited.
c. From two base interfaces a new interface cannot be inherited.
d. One class can implement only one interface.

6. Which of the following is the correct output for the C#.NET program given below?
int i = 20 ;
for( ; ; )
{
Console.Write(i + " ");
if (i >= -10)
i -= 4;
else
break;
}

a. 16 8 0 -8
b. 20 16 12 8 4 0 -4 -8 -12
c. 20 16 12 84 0 -4 -8
d. 16 12 8 4 0

7. Which is used to add event code (on C# Code) for TextBox control in Source view
(ASP.NET)?

a. MsgSent.Text = Msg.Text;
b. MsgSent.Text = Msg.Text
c. Both
d. None

8. How you can change the page title by changing the using C#?

a.void buttonSet_Click(Object sender, EventArgs earg)


{
Msg.Text: Header.Title;
}
b. void buttonSet_Click(Object sender, EventArgs earg)
{
Header.Title :Msg.Text;
}
c. void buttonSet_Click(Object sender, EventArgs earg)
{
Msg.Text= Header.Title;
}
d. None

9. In an inheritance chain which of the following members of base class are accessible to
the derived class members?
1. static
2. protected
3. private
4. shared
5. public

a. 1, 3
b. 4, 5
c. 3, 4
d. 2, 5

10. A class implements two interfaces each containing three methods. The class contains no
instance data. Which of the following correctly indicate the size of the object created from
this class?

a. 12 bytes
b. 0 bytes
c. 24 bytes
d. 8 bytes

11. Which of the following statements are correct about the C#.NET code snippet given
below?
if (age > 18 || no < 11)
a = 25;
1. The condition no < 11 will get evaluated only if age > 18 evaluates toFalse.
2. The condition no < 11 will get evaluated if age > 18 evaluates to TRUE.
3. The statement a = 25 will get evaluated if any one one of the two conditions
is TRUE.
4. || is known as a short circuiting logical operator.
5. The statement a = 25 will get evaluated only if both the conditions are TRUE.

a. 1, 3, 5
b. 2, 4
c. 1, 3, 4
d. 2, 3, 4
12. Which of the following statements are correct?
1. The switch statement is a control statement that handles multiple selections and
enumerations by passing control to one of the case statements within its body.
2. The goto statement passes control to the next iteration of the enclosing iteration
statement in which it appears.
3. Branching is performed using jump statements which cause an immediate transfer
of the program control.
4. A common use of continue is to transfer control to a specific switch-case label or
the default label in a switch statement.
5. The do statement executes a statement or a block of statements enclosed
in{} repeatedly until a specified expression evaluates to false.

a. 1, 2, 4
b. 1, 3, 5
c. 3, 4, 5
d. None of these

13. For the code snippet given below, which of the following statements are valid?
public class MyContainer<T> where T: IComparabte
{
// Insert code here
}

1. Class MyContainer requires that it's type argument must


implementIComparabte interface.
2. Type argument of class MyContainer must be IComparabte.
3. Compiler will report an error for this block of code.
4. This requirement on type argument is called as constraint.

a. 1 and 4 only
b. 1, 2 and 4 only
c. 2 and 3 only
d. All of these above

14. In a ASP.NET page, which is the best way to find if the contents of a TextBox has
changed after the form containing the TextBox has been posted back to the server?

a. By comparing the old value with the new value


b. By handling the TextBox control's TextChanged event
c. By checking the HasChanged property of the TextBox
d. By checking the NewValue property of the TextBox control

15. Which of the following statements is valid about advantages of generics?

a. Generics shift the burden of type safety to the programmer rather than compiler.
b. Generics eliminate the possibility of run-time errors.
c. Generics require use of explicit type casting.
d. Generics provide type safety without the overhead of multiple implementations.
e. None of these above.

16. Which namespace would you use if you need to create an ASP.NET application with
Microsoft SQL Server 2000 as the database?

a. System.Data.SQLClient.
b. System.Data.SQLServer.
c. System.Data.OleDb
d. System.Data.Microsoft

17. What method of the Command object would you use if you need to retrieve a single value
(for example an aggregate value) from a database?

a. ExecuteScalar()
b. ExecuteReader()
c. ExecuteSingle()
d. ExecuteNonQuery()

18. Which of the following CANNOT be used as an underlying datatype for an enum in
C#.NET?

a. byte
b. short
c. int
d. float

19. You are creating a Web service that will include a Web method. You want the method to
return its data to the caller as it is created and put into a serial stream, rather than
waiting for all of the data to be prepared before returning it. Which of the
following WebMethod attributes should you set to enable this.

a. <WebMethod(EnableSession:=True)>
b. <WebMethod(BufferResponse:=False)>
c. <WebMethod(EnableSession:=False)>
d. <WebMethod(BufferResponse:=True)>
20. In C#.NET if we do not catch the exception thrown at runtime then which of the following
will catch it?

a. Compiler
b. Linker
c. CLR
d. Operating System

21. How can you load an XML file directly into a DataSet?

a. By setting the XML property of the DataSet class


b. By using the GetXML() method of the DataSet class
c. You cannot load an XML file directly into a DataSet
d. By using the ReadXml() method of the DataSet class

22. Which of the following is an ordered collection class?

a. HashTable
b. Queue
c. Stack
d. Map

23. What will be the output of the C#.NET code snippet given below?
namespace IndiabixConsoleApplication
{
class SampleProgram
{
static void Main(string[ ] args)
{
int i, j;
int[ , ] arr = new int[ 2, 2 ];
for(i = 0; i < 2; ++i)
{
for(j = 0; j < 2; ++j)
{
arr[i, j] = i * 17 + i * 17;
Console.Write(arr[ i, j ] + " ");
}
}
}
}
}

a. 0 0 17 17
b. 17 17 0 0
c. 0 0 17 34
d. 0 0 34 34

24. Which is the default method that will be called on a controller if one is not explicitly
specified in Asp.Net MVC ?

a. Home
b. Index
c. Default
d. Welcome

25. Which one of the following statements is correct?

a. Array Elements can be of integer type only.


b. The Array elements are guaranteed to be sorted
c. The length of an Array is the number of dimensions in the Array
d. The default value of numeric array elements is zero

26. In order for an instance of a derived class to completely take over a class member from a
base class, the base class has to declare that member as

a. virtual
b. base
c. overrides
d. overload

27. Which of the following statements is correct about Managed Code?

a. Managed code is the code that is compiled by the JIT compilers.


b. Managed code is the code that is written to target the services of the CLR.
c. Managed code is the code that can run on top of Linux.
d. Managed code is the code that runs on top of Windows.

28. Which of the following will be the correct output for the C#.NET program given below?
namespace IndiabixConsoleApplication
{
class SampleProgram
{
static void Main(string[] args)
{
int num = 1;
funcv(num);
Console.Write(num + ", ");
funcr(ref num);
Console.Write(num + ", ");
}
static void funcv(int num)
{
num = num + 10; Console.Write(num + ", ");
}
static void funcr (ref int num)
{
num = num + 10; Console.Write(num + ", ");
}
}
}

a. 11, 21, 11, 21


b. 11, 21, 21, 11
c. 1, 11, 1, 11
d. 11, 1, 11, 11

29. Which of the following statements is correct about the C#.NET code snippet given below?
interface IMyInterface
{
void fun1();
int fun2();
}
class MyClass: IMyInterface
{
void fun1()
{}
int IMyInterface.fun2()
{}
}

a. MyClass is an abstract class.


b. A subroutine cannot be declare inside an interface.
c. The definition of fun1() in class MyClass should be void IMyInterface.fun1().
d. A function cannot be declared inside an interface.

30. What does Dispose method do with connection object?

a. Close the connection


b. Deletes it from Memory
c. Temporary dispose the connection
d. All the above

31. Which of the following statements is correct?

a. Widening conversions take place automatically.


b. Information is never lost during narrowing conversions.
c. The CInteger() can be used to convert Single to an Integer
d. 3.14 can be treated as Decimal by using it in form 3.14F

32. Is it possible to store multiple data types in System.Array?

a. Yes
b. Yes, but only three
c. No
d. Both a and b.

33. Which property is used to name the web control?

a. Designation
b. Name
c. ControlName
d. Id

34. What will be the output of following?


public class ClassA
{
public ClassA
{
Console.WriteLine(“Class A”);
}
}
class ClassB : ClassA
{
public ClassB
{
Console.WriteLine(“Class B”);
}
}
class ClassC : ClassB
{
public ClassC
{
Console.WriteLine(“Class C”);
}
}

class Main
{
public static void main()
{
ClassC obj = new ClassC();
}
}

a. Class C
b. Class A Class B Class C
c. Class C Class B Class A
d. Class C Class B

35. What is the last stage for the Web Forms lifecycle?

a. Page_Load
b. Page_Init
c. Validate
d. Page_Unload

36. You have been asked to debug a Web-Based ASP.NET application. For some reason, the
debugging information is not presented. What could be missing?

a. <%@Application Trace = “true”%>


b. <%@Application Page = “true”%>
c. <%@Page Trace =”true”%>
d. <%@Page Debug=”true”%>

37. Which user action will not create server-side event?

a. Text Change
b. Button Click
c. Mouse Move
d. All the Above

38. What is the 1st method that is fired during the Page Load?

a. Init()
b. PreRender()
c. Load()
d. UnLoad()

39. Can multiple catch blocks be executed for a single try statement? In other words if a
body of a catch block is executed can code inside another catch block also be executed?
a. Yes
b. No
c. Under certain conditions
d. Both a and c.

40. Which of the following security features can .NET applications avail?
1. PIN Security
2. Code Access Security
3. Role Based Security
4. Authentication Security
5. Biorhythm Security

a. 1, 4, 5
b. 3, 4
c. 2, 5
d. 2, 3

41. Is it possible to change the value of a variable while debugging a C# application?

a. Yes
b. No
c. Both
d. None

42. Which design pattern is shown below?


public class A
{
private static A instance;

private A(){}

public static A Instance


{
get
{
If(instance == null)
{
instance = new A();
}
return instance;
}
}
}

a. Factory
b. Abstract Factory
c. Singleton
d. Builder

43. What will be the output of the following code snippet when it is executed?

int x = 1;
float y = 1.1f;
short z = 1;
Console.WriteLine((float) x + y * z - (x += (short) y));
a. 1.1
b. 0.1
c. 1.0
d. 11

44. What is the output of following code?


class X
{
Y b = new Y();
public X()
{
Console.Write(“X”);
}
}

class Y
{
public Y()
{
Console.Write(“Y”);
}
}

class Z : X
{
Y y = new Y();
public Z()
{
Console.Write(“Z”);
}
}
class Program
{
public static void main()
{
new Z();
}
}

a. YZ
b. Z
c. YXYZ
d. YYXZ

45. If a class Student has an indexer, then which of the following is the correct way to
declare this indexer to make the C#.NET code snippet given below work successfully?

Student s = new Student();


s[1, 2] = 35;

a. class Student
{
int[ ] a = new int[5, 5];
public property WriteOnly int this[int i, int j]
{
set
{
a[i, j] = value;
}
}
}
b. class Student
{
int[ , ] a = new int[5, 5];
public int this[int i, int j]
{
set
{
a[i, j] = value;
}
}
}
c. class Student
{
int[ , ] a = new int[5, 5];
int i, j;
public int this
{
set
{
a[i, j] = value;
}
}
}
d. class Student
{
int[ , ] a = new int[5, 5];
public int property WriteOnly
{
set
{
a[i, j] = value;
}
}
}
1)
. Which of the following statements are TRUE about the .NET CLR?
1. It provides a language-neutral development & execution
environment.
2. It ensures that an application would not be able to access
memory that it is
not authorized to access.
3. It provides services to run "managed" applications.
4. The resources are garbage collected.
5. It provides services to run "unmanaged" applications.

A. Only 1 and 2
B. Only 1, 2 and 4
C.1, 2, 3, 4
D.Only 4 and 5

Option C

2
Which of the following statements is correct about Managed Code?
A.Managed code is the code that is compiled by the JIT compilers.
B. Managed code is the code where resources are Garbage Collected.
C. Managed code is the code that runs on top of Windows.
D. Managed code is the code that is written to target the services
of the CLR.

Option D

3
Which of the following utilities can be used to compile managed assemblies into
processor-specific native code?
A. gacutil
B. ngen
C. sn
D. ildasm

Option B

. Which of the following are NOT true about .NET Framework?


1. It provides a consistent object-oriented programming environment whether
object code is stored and executed locally, executed locally but Internet-
distributed, or executed remotely.
2. It provides a code-execution environment that minimizes software
deployment and versioning conflicts.
3. It provides a code-execution environment that promotes safe execution of
code, including code created by an unknown or semi-trusted third party.
4. It provides different programming models for Windows-based applications
and Web-based applications.
5. It provides an event driven programming model for building Windows
Device Drivers.

A. 1, 2
B. 2, 4
C. 4, 5
D. 1, 2, 4
Option C

Code that targets the Common Language Runtime is known as


A. Unmanaged
B. Distributed
C. Legacy
D. Managed Code

Answer : D

6. What is need of ‘Conversion of data type’ in C#?


a) To store a value of one data type into a variable of another data
type
b) To get desired data
c) To prevent situations of run time error during change or conversion
of data type
d) None of the mentioned
Answer: c

7. Types of ‘Data Conversion’ in C#?


a) Implicit Conversion
b) Explicit Conversion
c) Implicit Conversion and Explicit Conversion
d) None of the mentioned
Answer: b

8.’Implicit Conversion’ follows the order of conversion as per compatibility


of
datatype as :
a) float > char > int
b) char > int > float
c) int > char > float
d) float > int > char
Answer: b

9. Subset of ‘int’ datatype is :


a) long ,ulong, ushort
b) long, ulong, uint
c) long, float, double
d) long, float, ushort
Answer: c

10. Type of Conversion in which compiler is unable to convert the datatype


implicitly
is ?
a) ushort to long
b) int to uint
c) ushort to long
d) byte to decimal
Answer:b

11. Explicit Conversion disadvantages are ?


a) Makes program memory heavier
b) Results in loss of data
c) Potentially Unsafe
d) None of the mentioned
Answer: b, c
12. Which refrence modifier is used to define reference variable?
a) &
b) ref
c) #
d) $
Answer :b.

13. What is output for following set of expression?


int a+= (float) b/= (long)c.
a) float
b) int
c) long
d) None of the mentioned
Answer :b

14. Select correct statement about ‘ref’ keyword in C#?


a) References can be called recursively
b) The ‘ref’ keyword causes arguements to be passed by reference
c) When ‘ref’ are used any changes made to parameters in method will
be
refelected in variable when control passed back to calling method
d) All of above mentioned
Answer: b ,c

15. Select correct difference between ‘=’ and ‘==’ in C#.


a) ‘==’ operator used to assign values from one variable to another
variable
‘=’ operator used to compare value between two variables
b) ‘=’ operator used to assign values from one variable to another
variable
‘==’ operator used to compare value between two variables
c) No difference between both operators
d) None of the mentioned
Answer :b.

16. Select which is used to define the member of a class externally?


a) :
b) ::
c) #
d) none of the mentioned
Answer: b

17. The operator used to access member function of a class?


a) :
b) ::
c) .
d) #
Answer: c

18. What is most specified using class declaration ?


a) type
b) scope
c) type & scope
d) None of mentioned
Answer: c

19. Which of following statements about objects in “C#― is correct?


a) Everything you use in C# is an object, including Windows Forms and
controls
b) Objects have methods and events that allow them to perform actions
c) All objects created from a class will occupy equal number of bytes in
memory
d) None of the mentioned
Answer: a, b, c

20. “A mechanism that binds together code and data in manipulates, and keeps
both
safe from outside interference and misuse.In short it isolates a particular code
and
data from all other codes and data. A well-defined interface controls the access
to
that particular code and data.―
a) Abstraction
b) Polymorphism
c) Inheritance
d) Encapsulation
Answer: d

21

Which of the following statements is correct about the .NET Framework?


A. .NET Framework uses DCOM for achieving language
interoperability.
B. .NET Framework is built on the DCOM technology.
C. .NET Framework uses DCOM for making transition between managed and
unmanaged code.
D. .NET Framework uses DCOM for creating unmanaged applications.

Answer : C

22

Which of the following are parts of the .NET Framework?


1. The Common Language Runtime (CLR)
2. The Framework Class Libraries (FCL)
3. Microsoft Published Web Services
4. Applications deployed on IIS

A. Only 1, 2, 3
B. Only 1, 2
C. Only 1, 2, 4
D. Only 4

Answer : B

23

Application Domain is useful when you need to unload loaded assembly.


A. Yes Always
B. No for security reasons
C. Only if assembly is in current directory
D. Only if assembly is in GAC
Answer : B

24

Which of the following is NOT a namespace in the .NET Framework Class Library?
A. System.Process
B. System.Security
C. System.Threading
D. System.Drawing
E. System.Xml

Option A

25

Which of the following statements is correct about a namespace in C#.NET?


A. Namespaces help us to control the visibility of the elements
present in it.
B. A namespace can contain a class but not another namespace.
C. If not mentioned, then the name 'root' gets assigned to the
namespace.
D. It is necessary to use the using statement to be able to use an element
of a namespace.

Option A

26. Correct way of declaration of object of following class is ?


class name
a) name n = new name();
b) n = name();
c) name n = name();
d) n = new name();
Answer: a

27. The data members of a class by default are ?


a) protected,public
b) private,public
c) private
d) public
Answer: c

28. What do the following code implies ?


csharp abc;
abc = new charp();
a) Object creation on class csharp
b) Create an object of type csharp on heap or on stack depending on size
of object
c) create a reference c on csharp and an object of type csharp on heap
d) create an object of type csharp on stack
Answer: c

29. How many values does a function returns?


a) 0
b) 2
c) 1
d) any number of values
Answer: c
30. Correct statement about constructors in C#.NET is ?
a) Constructor cannot be overloaded
b) Constructor allocate space for object in memory
c) Constructor are never called explicitly
d) Constructor have same name as name of the class
Answer: d, c

31. Can the method add() be overloaded in the following ways in C#?
public int add() { }
public float add(){ }
a) True
b) False
c) None of the mentioned.
Answer: b

32. Which of the following statements is correct about constructors in C#.NET?


a) A constructor cannot be declared as private
b) A constructor cannot be overloaded
c) A constructor can be a static constructor
d) None of the mentioned
Answer: c

33. What is return type of constructors?


a) int
b) float
c) void
d) None of the mentioned
Answer: d

34. Which of the following statements are correct?


a) There is one garbage collector per program running in memory
b) There is one comman garbage collector for all programs
c) To garbage collect an object set all references to it to null
d) We have to specify run the garbage collector after executing VISUAL
STUDIO.NET
Answer :b, c.

35. Operator used to free the memory when memory is allocated ?


a) new
b) free
c) delete
d) None of the mentioned
Answer :c

36
Which of the following is absolutely neccessary to use a class Point
present in
namespace Graph stored in library?
A. Use fully qualified name of the Point class.
B. Use using statement before using the Point class.
C. Add Reference of the library before using the Point class.
D. Use using statement before using the Point class.
.
Option C

37

Which of the followings are NOT a .NET namespace?


1. System.Web
2. System.Process
3. System.Data
4. System.Drawing2D
5. System.Drawing3D

A. 1, 3
B. 2, 4, 5
C. 3, 5
D. 1, 2, 3

Option B

38
Which of the following statements is correct about a namespace used in
C#.NET?
A. Nested namespaces are not allowed.
B. Importing outer namespace imports inner namespace.
C. Nested namespaces are allowed.
D. If nested, the namespaces cannot be split across files.

Option C

39
Which of the following is an 8-byte Integer?
A.Char
B. Long
C. Short
D. Byte

Option B

40

Which of the following statements is correct?


A. Information is never lost during narrowing conversions.
B. The CInteger() function can be used to convert a Single to an
Integer.
C. Widening conversions take place automatically.
D. Assigning an Integer to an Object type is known as Unboxing.

Option C

41. Accessibility modifier defined in a class are?


a) public, private, protected
b) public, internal, protected internal.
c) public, private, internal, protected internal.
d) public, private, protected, internal, protected internal
Answer :d

42. Choose statements which are true in nature:


a) The base class member functions can access public member functions of
derived
class
b) An object of a derived class cannot access private member of the base
class
c) Private members of base class cannot accessed by derived class member
functions
or objects of derived class
d) None of the mentioned
Answer : b, c

43. Which of these access specifiers must be used for main() method?
a) private
b) public
c) protected
d) None of the mentioned
Answer :b

44. Keyword used to define call by reference paramter in C# .NET?


a) &
b) out
c) ref
d) &&
Answer :c

45. Which statement is/are correct?


a) An arguement passed to a ref parameter need not to be intialized
first
b) variables passed as out arguments need to be intialized prior to
being passed
c) to use a ref parameter only the calling method must explicitly use
the ref keyword
d) None of the mentioned
Answer :d

46. Which of the following statements is incorrect about delegate?


A. Delegates are reference types.
B. Delegates are object oriented.
C. Delegates are type-safe.
D. Only one method can be called using a delegate.

Option D

47. The declaration of a delegate must match the signature of the method
that we intend to call using it.
5. Functions called using delegates are always late-bound.

A. 1 and 2 only
B. 1, 2 and 3 only
C. 2, 3 and 4 only
D. None of the above
Option D

48. Which of the following statements are correct about delegates?


1. Delegates are not type-safe.
2. Delegate is a user-defined type.
3. Only one method can be bound with one delegate object.
4. Delegates can be used to implement callback notification.
49. Delegates permit execution of a method on a secondary thread in an
asynchronous manner.

A. 1 and 2 only
B. 1, 2 and 3 only
C. 2, 4 and 5 only
D. All of the above
Option C

50. Choose correct statement which support facts that why C# doesnot allow
creation
of empty structures?
a) C#.NET supports creation of abstract user-defined data types using
structures
b) By having empty structures,it would mean that the new data types has
no data
associated with which donot make any sense in C#.NET
c) Basic reason to create structures is inability to represent real life
objects
using standard data types offered by the language
d) All of the above mentioned
Answer: d

51. Choose correct statement about structures why they are defined as value
types
but not reference typeS?
a) Since space required for structure variables is allocated on stack
which is a
form of memory that is automatically available when a variable to be used is in
scope.
b) Structures generally used to represent user defined data types that
consists of
small amount of data in them hence using stack for deceleration of such
variables
is not problem.
c) All of the mentioned
d) None of the mentioned
Answer: c

52. Choose correct statement about structures in C#.NET?


a) Structures can be declared within a procedure
b) Structs can implement an interface but they cannot inherit from
another struct
c) Struct members cannot be declared as protected
d) A structure can be empty
Answer: b, c

53. When does structure variable get destroyed?


a) When no reference refers to it,it will get garbage collected
b) Depends on either it is created using new or without new operator
c) As variable goes out of the scope
d) Depends on either we free it’s memory using free() or delete()
Answer: c

54. Select correct statements among the following?


a) A struct can contain properties
b) A struct can contain constructors
c) A struct can contain protected data members
d) A struct cannot contain constants
Answer: a, b

55. Choose correct statements about enum used in C#.NET?


a) An enum variable cannot have a private access modifier
b) An enum variable can be defined inside a class or a namespace
c) An enum variable cannot have a protected access modifier
d) An enum variable cannot have a public access modifier
Answer: c

56. Which among the following cannot be used as a datatype for an enum in
C#.NET?
a) short
b) double
c) int
d) float
Answer: d, b

57. Correct statement about enum used in C#.NET is?


a) An enum can be declared inside a class
b) An object can be assigned to an enum variable
c) An enum can be declared outside a class
d) An enum can have Single, Double values
Answer: a, c

58. Choose correct statement about enum used in C#.NET ?


a) By default the first enumerator had a value equals to number of
elements present
in the list
b) Values of enum elements cannot be populated from database
c) The value of each successive enumerator is decreased by 1
d) An enumerator had white space in its name
Answer: b

59. Choose the correct differences which diferent enum from C#.NET than enum in
C
language?
a) C is a stricly typed language also C#.NET is a strictly typed
language
b) In C language variables of enum types can be used interchangeably
with integers
using type casts while enum variables cannot be used as a normal integers
c) C is not a strictly typed language while C#.NET is a strictly typed
language
d) All of the mentioned
Answer: b, c

60. A type of class which does not have it’s own objects but acts as a base
class
for it’s subclass is known as?
a) Static class
b) Sealed class
c) Abstract class
d) None of the mentioned
Answer :c

61. If a class inheriting an abstract class does not define all of its function
then
it will be known as?
a) abstract
b) A simple class
c) Static class
d) None of the mentioned
Answer :a

62. Which of the following modifier is used when an abstract method is redefined
by
a derived class?
a) Overloads
b) Override
c) Base
d) Virtual
Answer :b

63. Choose the correct statements about write-only properties in C#.NET?


a) Properties which can only be set
b) Properties once set and hence values cannot be read back in nature
c) Useful for usage in classes which store sensitive information like
password of a
user
d) None of the above mentioned
Answer: a, b, c

64. Consider a class maths and we had a property called as sum.b is a reference
to a
maths object and we want the statement b.sum = 10 to fail.Which is the correct
solution to ensure this functionality?
a) Declare sum property with both get and set accessors
b) Declare sum property with only get accessor
c) Declare sum property with get, set and normal accessors
d) None of the mentioned
Answer: c

65. Consider a class maths and we had a property called as sum.b is a reference
to a
maths object and we want the statement Console.WriteLine(b.sum)to fail.Which is
the
correct solution to ensure this functionality?
a) Declare sum property with only get accessor
b) Declare sum property with only set accessor
c) Declare sum property with both set and get accessor
d) Declare sum property with both set, get and normal accessor
Answer: b

66. Select the correct statement about properties in C#.NET?


a) A property can simultaneously be read or write only
b) A property can be either read only or write only
c) A write only property will have only get accessor
d) A read only property will have only get accessor
Answer: b, d

67. Select the type of multitasking methods exists really:


a) process based
b) thread based
c) only a
d) Both a & b
Answer: d

68. Choose the correct statement about process-based multitasking:


a) feature that allows our computer to run two or more programs
concurrently
b) program acts as a small unit of code that can be dispatched by the
scheduler
c) Only b
d) Both a & b
Answer: d

69. Choose the statements which differs the thread based multitasking and
process
based multitasking from each other:
a) Process-based multitasking handles the concurrent execution of
programs
b) Process-based multitasking handles the concurrent execution of pieces
of the
same program
c) Thread-based multitasking handles the concurrent execution of
programs
d) Thread-based multitasking deals with the concurrent execution of
pieces of the
same program
Answer: a, d

70. What is the advantage of the multithreading programs?


a) Enables to utilize the idle and executing time present in most
programs
b) Enables to utilize the idle time presnt in most programs
c) Both a & b
d) Only b
Answer: d

71. Select the two type of threads mentioned in the concept of multithreading:
a) foreground
b) background
c) only a
d) Both a & b
Answer: d

72. Number of threads exists there for each of the processes that occures in the
program:
a) atmost 1
b) atleast 1
c) only 1
d) Both b & c
Answer: a, c

73. Choose the namespace which supports the multithreading programming:


a) System.net
b) System.Linq
c) System.Threading
d) All of the mentioned
Answer: c

74. Which of these keywords are used to implement synchronization?


a) synchronize
b) syn
c) synch
d) synchronized
Answer: d

75. Which keyword is used for using the synchronization features defined by the
Monitor class?
a) lock
b) synchronized
c) Monitor
d) locked
Answer: a

76. What is synchronization in reference to a thread?


a) Its a process of handling situations when two or more threads need
access to a
shared resource
b) Its a process by which many thread are able to access same shared
resource
simultaneously
c) Its a process by which a method is able to access many different
threads
simultaneously
d) Its a method that allow to many threads to access any information the
require
Answer: a

77. Which method is called when a thread is blocked from running temporarily?
a) Pulse()
b) PulseAll()
c) Wait()
d) Both b & c
Answer: c

78. What kind of exception is being thrown if Wait(),Pulse() or Pulse All()


iscalled
from code that is not within synchronized code?
a) System I/O Exception
b) DivideByZero Exception
c) SynchronizationLockException
d) All of the mentioned
Answer: c

79. What is mutex?


a) a mutually exclusive synchronization object
b) can be acquired by more than one thread at a time
c) helps in sharing of resource which can be used by one thread at only
one a time
d) All of the mentioned
Answer: a, c

80 ADO.NET provides the ability to create and process in-memory databases


called:
A. views
B. relations
C. tables
D. datasets.

answer : D

81 What are major difference between classic ADO and ADO.NET?


A. In ADO we have recordset and in ADO.NET we have dataset.
B. In recordset we can only have one table. If we want to accommodate more than
one tables. We need to do inner join and fill the recordset. Dataset can have
multiple tables.
C. All data persist in XML as compared to classic ADO where data persisted in
Binary format also.
D. All of the above

answer : D
82
BindingContext, CurrencyManager and PropertyManager are the classes of -----
namespace.
A. System.Object
B. System.Data
C. System.Windows.Forms
D. System.Windows
answer : D

83 The DataBindings property is an instance of ---------


A. ControlCollection
B. CurrencyManager
C. ControlBindingsCollection
D. Control
answer : C

84 Under ADO.NET object is used to populate DataSets


A. DataReader
B. DataAdapter
C. Command
D. None of the above
answer : B

85 Which methods provided by the dataset object to generate XML in ADO.Net?


A. ReadXML
B. GetXML
C. Writexml
D. All of Above
answer : D

86 The DataSet object is a storage.


A. connected
B. disconnected
C. polling
D. None
answer : B

87. Choose the namespace in which Expression trees are encapsulated:


a) System.Linq
b) System.Linq.Expressions
c) System.Text
d) System.Collections.Generic
Answer: b

88. Which of given statements are valid about generics in .NET Framework?
a) generics are useful in collection classes in .NET framework
b) generics delegates are not allowed in C#.NET
c) generics is a language feature
d) All of the mentioned
Answer: c, a

89. Correct statement valid about generic procedures in C#.NET are?


a) All procedures in a Generic class are generic
b) Generic procedures should take at least one type parameter
c) Only those procedures labeled as Generic are Generic
d) None of the mentioned
Answer: b

90. Which among the given class represents System.Collections.Generic namespace?


a) SortedDictionary
b) Sorted Array
c) Stack
d) Tree
Answer: a, c

91. Among from the following ‘ref’ keyword can be used with?
a) static function/subroutine
b) static data
c) Instance function/subroutine
d) instance data
Answer: a, c

92. To implement delegates the necessary condition for implementation is?


a) class decleration
b) inheritance
c) run time polymorphism
d) exceptions
Answer: a

93. Suppose a Generic class called as SortObjects is to made capable of sorting


objects of any type(integer, single, byte etc).Hence, which following
programming
construct is able to implement the comparision function?
a) interface
b) encapsulation
c) delegate
d) attribute
Answer: c

94. To generate a simple notification for an object on runtime the programming


construct to be used for implementation this idea?
a) namespace
b) interface
c) delegate
d) attribute
Answer: c

95. Choose the incorrect statement about the delegate?


a) delegate are of reference types
b) delegates are object oriented
c) delegates are type safe
d) none of the mentioned
Answer: d

96. Correct statement about delegate declaration given below is ?


delegate void del(int i);
a) On declaring the delegate a class called del is created
b) the del class is derived from the MulticastDelegate class
c) the del class will contain a one arguement constructor and an
invoke() method
d) none of the mentioned
Answer: a, b, e

97. Which is the incorrect statement about delegate?


a) A single delegate can invoke more than one method
b) delegates could be shared
c) delegates are type safe wrappers for funtion pointers
d) delegate is a value type
Answer: c

98. Choose statements which differentiate delegate in C#.NET than a conventional


function pointer in other languages?
a) delegate in C#.NET represent a new type in the Comman Type System
b) delegate allow static as well as instance methods to be invoked
c) delegate are type safe and secure
d) none of the mentioned
Answer: d

99. Select the namespace on which the stream classes are defined?
a) System.IO
b) System.Input
c) System.Output
d) All of the mentioned
Answer: a

100. Choose the class on which all stream classes are defined?
a) System.IO.stream
b) Sytem.Input.stream
c) System.Output.stream
d) All of the mentioned
Answer: a

101. A method used to write a single byte to an output stream?


a) void WriteByte(byte value)
b) int Write(byte[] buffer ,int offset ,int count)
c) write()
d) None of the mentioned
Answer: a

102. Select the method which writes the contents of the stream to the physical
device.
a) fflush()
b) void fflush()
c) void Flush()
d) flush()
Answer: c

103. Which statement correctly defines about Interfaces in C#.NET?


a) Interfaces cannot be inherited
b) Interfaces consists of data static in nature and static methods
c) Interfaces consists of only method declaration
d) None of the mentioned
Answer: d

104. Which keyword used for correct implementation of an interface in C#.NET?


a) interface
b) Interface
c) intf
d) Intf
Answer: a
105. Select which among is NOT an exception?
a) Stack Overflow
b) Arithmetic Overflow or underflow
c) Incorrect Arithmetic Expression
d) All of the above mentioned
Answer :c

106. Select which among is NOT considered as .NET Exception class?


a) Exception
b) StackUnderflow Exception
c) File Found Exception
d) Divide By zero Exception
Answer :b, c

107. Select the statements which describes correctly usage of exception handling
over conventional error handling approaches?
a) As errors can be ignored but exceptions cannot be ignored
b) Exception handling allows seperation of program’s logic from error
handling
logic making software more reliable and maintainable
c) try – catch – finally structure allows guaranteed cleanup in
event of errors
under all circumstances
d) All of the above mentioned
Answer :d

108. Select the correct statement about an Exception?


a) It occurs during loading of program
b) It occurs during Just-In-Time compilation
c) It occurs at run time
d) All of the above mentioned
Answer :c

109. Which of these keywords is not a part of exception handling?


a) try
b) finally
c) thrown
d) catch
Answer :c
Time 20 mins

1. Which is the default base class for all classes?


AA. Sy stem.object
B. Sy stem.Object
C. Sy stemObject
D. Object Sy stem

2. How do y ou specify that a class cannot be used as a base class?


A. mark it as a struct( struct class My Class{})
B. change its access specifier from public to any other access specifier( internal class
My Class{})
C. make it abstract ( abstract class My Class{])
D. make it sealed ( sealed class My Class{})

3. This is the correct sy ntax for overloading the + operator for My Class and a int A.
public My Class operator+(int a){...}
B. public static My Class operator+(int a){...}
C. public My Class operator+(My Class x ,int a){...}
D. public static My Class operator+(My Class x ,int a){...}

4. This is the correct sy mt ax for writing an extension met hod for a string A.
public void DoSomet hing(string a){...}
B. public IExtension void DoSomet hing(string a){...}
C. public static void DoSomet hing(string a){...}
D. public static void DoSomet hing(this string a){...}

5. What does Array .Index Of() return if the item being searched is not found?
A. null
B. error
C. Index of the last item + 1
D. -1

6. Give the CTS(Common Ty pe Sy stem) ty pe for float


A. Sy stem.Float
B. Sy stem.Decimal
C. Sy stem.Single
D. Sy stem.Double

7. char variables occupy ___ by tes


A. 1
B. 2
C. 0
D. 4

8. What is the correct sy ntax for a lambda that takes no paramet ers and has mult iple lineof
code
a. ()=> {code}
b. => code
c. delegate(){}
d Not possible to do so

9. For a class to be serialized using the Binary Format ter,


A. The class needs to be marked with an attribute ISerializable
B. The assembly needs to be marked with an attribute ISerializable
C. The class needs to be marked with an attribute Serializable
D. The assembly needs to be marked with an attribute Serializable

10. Which of these is correct for the explicit implement ation of an interface? A.
public void Met hod1(){}
B. void Met hod1(){}
C. public void InterfaceName.Met hod1(){}
D. void InterfaceName.Met hod1(){}

11. How do y ou declare a nullable int?


A. Nullable int a;
B. int a = null;
C. int? a; OR Nullable< T> i = null;
D. int?? a;

12. Which interface does Array List implement ?


A. IList
B. IList< T>
C. IDictionary
D. IDictionary < TKey ,TValue>

13. Which of these is the correct sy ntax for an object initializer?


a. Class1 o = new Class1{a=10};
b. Class1 o = new Class1(){a=10};
c. Class1 o = new Class1(20){a=10};
d. All of the above

14. How do y ou call a function using ThreadPool?


a. Start
b. Begin
c. Invoke
d. QueueUserWorkItem

15. Which of the following statement s is false?


A. A struct does not allow inheritance.
B. A struct cannot have a no paramet er constructor
C. A struct is a value ty pe
D. A struct is stored on the stack in memory .
E. A struct cannot have met hods.

16. In FormsA uthentication, the following met hod deletes the authentication cookie. A.
FormsA uthentication.Cookie.Delete
B FormsA uthentication.Logout
C. FormsA uthentication.SignOut
D. FormsA uthentication.Cookie.Remov e

17. To generate a proxy class for a WCF service we use the following command line utility
a. genprox
b. svcutil
c. wsdl
d. csc

18. How do y ou override the bundling setting of web.config?


a. write code in BundleConfig.cs and set the EnableOptimizat ions
property of the BundleTable class
b. write code in BundleConfig.config and set the EnableOptimizat ions property of the
BundleTable class
c. write code in BundleConfig.cs and set the EnableOptimizat ions property of the
BundleCollection class
d. write code in BundleConfig.config and set the EnableOptimizat ions property of the
BundleCollection class

19. To achieve Minificat ion(Minificat ion remov es all whitespace and renames variables to their
shortest possible name) in asp.net mv c
a. Set minificat ion = true in compilat ion section in web.config
b. Set minificat ion = false in compilat ion section in web.config
c. Set debug = true in compilat ion section in web.config
d. Set debug = false in compilat ion section in web.config

20. To show a partial v iew in asp.net mv c with a met hod that returns a ht ml string we use
a. Ht ml.Part ial()
b. Ht ml.RenderPart ial()
c. Ht ml.RenderA ction()
d. Ht ml.RenderV iew()

==================================================================

.Net Mid module test

1. On compilat ion of CSharp source code, the output we get is


A. by te code
B. assembly
C. IL
D. MSIL

2. Jit compilat ion converts


A. IL to MSIL
B. MSIL to IL
C. source code to IL
D. source code to native code
E. none of the above
3. Garbage collection happens at
A. regular intervals
B. when an object goes out of scope
C. when the CLR decides
D. at the end of the code execution

4. App domains are


A. The area in memory where an application runs
B. The area inside a process where an application runs
C. The area where the application has its domain
D. On the heap

5. CLS is
A. a set of rules that all .net compilers follow
B. a set of rules that are allowed for a .net language
C. a set of rules that all .net languages must follow to be able to be
called from other languages
D. used for data ty pes

6. Give the CTS ty pe for float


A. Sy stem.Float
B. Sy stem.Decimal
C. Sy stem.Single
D. Sy stem.Double

7. char variables occupy ___ by tes


A. 1
B. 2
C. 0
D. 4

8. Which of the following statement s is True?


A. Func is used to call met hods with a void return ty pe, Action for non void return ty pe
met hods and Predicate for met hods with a bool paramet er
B. Func is used to call met hods with a void return ty pe, Action for non void return ty pe
met hods and Predicate for met hods with a bool return value
C. Action is used to call met hods with a void return ty pe, Func for non void return ty pe
met hods and Predicate for met hods with a bool paramet er
D. Action is used to call met hods with a void return ty pe, Func for
non void return ty pe met hods and Predicate for met hods with a bool
return value

9. When is the static constructor called?


A. whenever an object is created
B. when the class is loaded
C. when Main is called
D. whenever a static met hod is called

10. Which of the following is true for a static class? A.


It can only contain static met hods
B. It cannot be instantiated
C. It cannot be used as a base class
D. All of the above
E. None of the above

11. What is the default access specifier for members in a class?


A. internal
B. public
C.
private
D. protected

12. What is the default access specifier for a class declared in a namespace?
A. internal
B. public
C. private
D. protected

13.
class BaseClass
{ int a;
public BaseClass(int a)
{ this.a = a;}
}
class DerivedClass : BaseClass
{ int b;
public DerivedClass(int b)
{ this.b = b;}
}
class Program{
static void Main()
{ DerivedClass o = new DerivedClass(10);}
}

What is the value in o.a after running this code?A. 0


B. 10
C. null
D. code will not compile.

14. Which of these statement s is true?


A. To overload a function defined in the base class from the derived class we use the
overloads key word
B. To overload a function defined in the base class from the derived class we use the new (For
Met hod Hidding )key word
C. To overload a function defined in the base class from the derived class we use the
override key word
D. None of the above

15. Which of these statement s is true?


A. To hide a function defined in the base class from the derived class we use the
overloads key word
B. To hide a function defined in the base class from the derived class
we use the new key word
C. To hide a function defined in the base class from the derived class we use the override key
word
D. To hide a function defined in the base class from the derived class we use the sealed
key word
E. None of the above

16. Which of these statement s is false?


A. To override a function defined in the base class from the derived class the base class met
hod must be a v irtual met hod
B. To override a function defined in the base class from the derived class we use the override
key word
C. To override a function defined in the base class from the derived class the met hod
signatures must be the same
D. None of the above

17. Which of these statement s is false?


A. An abstract class need not have any abstract met hods
B. An abstract class cannot be instantiated
C. A class that contains at least one abstract met hod needs to be marked as abstract
D. A derived class must implement all abstract met hods of an abstract base class or the derived
class must be marked as abstract
E. None of the above

18. Which of these statement s is false?


A. A sealed class cannot be used as a base class
B. A sealed class can be instantiated
C. A sealed class cannot have v irtual met hods
D. A sealed class cannot have abstract met hods
E. None of the above

19. Which of these statement s is true?


A. In late binding, we declare an object of the base class and
allocate memory for a derived class
B. In late binding, we declare an object of the derived class and allocate memory for a
base class
C. In late binding, we cannot declare an object of the base class and allocate memory for a
sub-derived class
D. In late binding, we need not have any v irtual met hods in the base class
E. None of the above

20. Which of these is correct for the explicit implement ation of an interface? A.
public void Met hod1(){}
B. void Met hod1(){}
C. public void InterfaceName.Met hod1(){}
D. void InterfaceName.Met hod1(){}
21. How do y ou declare a nullable int?
A. Nullable int a;
B. int a = null;
C. int? a;
D. int?? a;

22. Which statement is false?


A. out variables need not have an initial value
B. out variables lose their initial value when they enter the function
C. y ou must init ialise an out varible before control leaves the function
D. out variables cannot be used in the function before they are init ialised
E. None of the above

23. Which statement is true?


A. ref variables need not have an initial value
B. ref variables lose their initial value when they enter the function
C. y ou must init ialise a ref varible before control leaves the function
D. ref variables cannot be used in the function before they are init ialised
E. None of the above

24.
int [,] arr = new int[4,3];
What will be the values for :
arr.Rank, arr.Get Length(1), arr.Get UpperBound(0)A. 2,
3, 3
B. 2, 4, 3
C. 2, 3, 4
D. 1, 3, 3
E. 1, 4, 3

25. What does Array .Index Of() return if the item being searched is not found?
A. null
B. error
C. Index of the last item + 1
D. -1

26. Which class is used to iterate thru a SortedList< TKey ,TValue> ?


A. Dictionary Entry
B. Dictionary Entry < TKey ,TValue>
C. Key ValuePair
D. Key ValuePair< TKey ,TValue>

27. Which interface does ICollection< T> inherit from?


A. IEnumerable
B. IEnumerable< T>
C. IList< T>
D. IDictionary < T>
E. None of the above
28. In generics, what constraint means that T can only be a value ty pe?
A. where T: value
B. where T: valueTy
pe C. where T:
struct
D. where T: class

29. What is the base class of all classes if no class has been specified as the base class?
A. Not hing
B. ToString()
C. base
D. Object

30. Which of the following statement s is false?


A. A struct does not allow inheritance.
B. A struct cannot have a no paramet er constructor
C. A struct is a value ty pe
D. A struct is stored on the stack in memory .
E. A struct cannot have met hods.

31. How do y ou specify that a thread should get a higher t ime slice?
a. set the Priority property
b. set the ThreadPriority property
c. set the TimeSlice in milliseconds
d. Cannot be done

32. How can y ou keep waiting t ill another thread(called t) finishes?


a. t.Join
b. t.Wait One
c. t.Wait
d. t .Sleep

33. Which of these is the correct sy ntax for an object initializer?


a. Class1 o = new Class1{a=10};
b. Class1 o = new Class1(){a=10};
c. Class1 o = new Class1(20){a=10};
d. All of the above

34. How do y ou call a function using ThreadPool?


a. Start
b. Begin
c. Invoke
d. QueueUserWorkItem

35. What is the correct sy ntax for a lambda that takes no paramet ers and has mult iple lineof
code
a. ()=> {code}
b. => code
c. delegate(){}
d Not possible to do so

======================================================================

1. Which of the following statement s is false?


a. The Garbage Collector uses the concept of generations to free memory .
b. Generation 0 is checked first.
c. If an object is not freed, it is promot ed to Generation N+1 where N is its current
generation.
d. There are a max imum of 3 generations 0,1,and 2.
e. None of the above.

2. Why should we implement IDisposable?


a. It is better than non determinist ic finalization
b. Dispose gets called automat ically for all objects in a using block
c. To write code to free resources
d. All of the above
e. None of the above

3. Which of the following statement s is false?


a. The Assembly contains Met adata and code.
b. The assembly is in MSIL format .
c. The assembly may contain one or more modules.
d. The assembly has an entry point (Main()).
e. None of the above.

4. Automat ic Property has the following sy ntax


a. public property property name{get {} set{}}
b. public int property name{get {} set{}}
c. public property name{get ; set;}
d. public int property name{get ; set;}

5. Which of the following statement s is false?


a. a reference ty pe cannot be passed as a ref
b. a value ty pe can be passed as a ref
c. ref and out can both change the value of the variable in the calling
code
d. a value ty pe can be passed as out

6. How can y ou keep waiting t ill another thread(called t) finishes?


a. t.Join
b. t.Wait One
c. t.Wait
d. t .Sleep

7. Which statement is true for an Extension met hod?


a. Extension met hods can be written in any class.
b. Extension met hods cannot have paramet ers.
c. Extension met hods can be overridden.
d. Extension met hods must be static.

8. Which of these met hods cannot be overridden?


a. static
b. override
c. v irtual
d. abstract

9. Which of the following ty pes can be used as a base class?


a. Abstract Class
b. Struct
c. Sealed class
d. Enum
e. None of the above

10. Which delegate class is used to specify a function to be called automat ically after the
function that is invoked by delegateobject.BeginInvoke?
a. IAsy ncResult
b. Asy ncCallback
c. Asy ncResult
d. Action
e. None of the above

11. How do y ou specify that a thread should get a higher t ime slice?
a. set the Priority property
b. set the ThreadPriority property
c. set the TimeSlice in milliseconds
d. Cannot be done

12. Which of these classes is used for sy nchronization in Threading?


a. ThreadPool
b. ThreadStart
c. Monit or
d. Paramet erizedThreadStart

13. What does a LINQ query return?


a. var
b. ICollection< T>
c. IList< T>
d. IEnumerable< T>

14. What is the correct sy ntax for a lambda that takes no paramet ers and has mult iple line of
code
a. ()=> {code}
b. => code
c. delegate(){}
d Not possible to do so
15. How do y ou convert Linq query to PLINQ?
a. cannot be done
b. just add the letter P before it
c. Use AsParallel() for the collection object
d. implement IEnumerable< Plinq>

16. Which of the following is a Value ty pe?


a. Array
b. Interface
c. Delegate
d. Class
e. None of the above

17. How can y ou call a function using Task?


a. Create a task object and call the Start met hod
b. Use Task.Run
c. Use Task.Factory .Start New
d. All of the above

18. Which of these is correct for a function that returns an int and takes a string as a
paramet er?
a. Action< int, string>
b. Action< string,int>
c. Func< int, string>
d. Func < string,int>

19. What is the correct sy ntax for operator overloading?


a. public int operator+(Class1 o, int i){}
b. public static int operator+(Class1 o, int i){}
c. public int operator+( int i){}
d. public static int operator+( int i){}

20. How do y ou call a function using ThreadPool?


a. Start
b. Begin
c. Invoke
d. QueueUserWorkItem

1. Which of the following statement s is correct


A. C# data ty pe bool - CTS ty pe Boolean, C# data ty pe float – CTS ty pe Float
B. C# data ty pe bool - CTS ty pe Bool, C# data ty pe float – CTS ty pe Float
C. C# data ty pe bool - CTS ty pe Boolean, C# data ty pe f loat – CTS
ty pe Single
D. C# data ty pe bool - CTS ty pe Bool, C# data ty pe float – CTS ty pe Single

2. Which of the following statement s is false?


A. Assembly met adata can be read using Reflection
B. Assembly is in IL form
C. Assembly contains met adata and code
D. Assembly can have attributes
E. None of the above

3. The default data ty pe of an enum is


A. Int 32
B. Int 16
C. Int 64
D. String

4. To make an assembly shared, we need to


… A. Give it a strong name
B. Sign it with a key pair
C. Install it in the GAC
D. All of the above
E. None of the above

5. i)Storing a value ty pe into a reference ty pe results in Boxing


ii)Storing a reference ty pe into a value ty pe results in Boxing
iii) Storing a value ty pe into a reference ty pe results in UnBoxing iv )
Storing a reference ty pe into a value ty pe results in UnBoxing
A. All are false
B. All are true
C. i)and iii) are true
D. ii)and iv ) are true
E. i)and iv ) are true
F. i)and ii) are true

6. Which of the following statement s is false?


A. All Generic Collections implement IEnumerable< T>
B. IList< T> inherits from ICollection< T>
C. IDictionary inherits from ICollection
D. ICollection inherits from IEnumerable
E. None of the above
7. To call a met hod asy nchronously using a delegate object, we use
A. objDel.Invoke(…)
B. objDel.BeginInvoke(…)
C. objDel.EndInvoke(…)
D. Sy stem.Delegat e.InvokeAsy nc(…)

8. What is the error in the following snippet?


void DoSomet hing()
{
try
{
…..
}
catch(Exception ex) { … }
catch(NullReferenceException ex) { … }
catch(DivideBy ZeroException ex) { … }
}

A. No finally written
B. No errors
C. ex object is re-declared mult iple t imes
D. Base class exception is given f irst

9. Which property must be set in WCF Configuration to allow users to see Exception
Details of a WCF Met hods?
A. serviceDebug allowExceptions
B. serviceDebug includeExceptionDetailInFaults
C. serviceDebug includeCustomEx ceptionDetails
D. serviceMet adata includeCustomEx ceptionDetails

10. To raise an event defined by y ou,


A. RaiseEvent Event Name
B. RaiseEvent Event Name(…)
C. Event Name(…)
D. DelegateClassName(…)

11. Which of the following is not a valid Thread state as defined in the ThreadState
enum?
A. Aborted
B. Running
C. Stopped
D. Sleep
E. Suspended
F. Background

12. What is true for a background thread?


A. Background thread cannot be called directly
B. Background thread gets a lesser priority
C. Background thread is Unmanaged code
D. Background thread runs only when the CPU is idle
E. All of the above
F. None of the above

13. What is the difference between out and ref variables?


A. out variables can’t change the calling code variable value but ref can
B. out variables can change the calling code variable value but ref can’t
C. out variables must be init ialized before the function ends. Not
required for ref variables
D. out variables can’t be used for reference ty pes but ref can.
E. None of the above

14. What is false for a static constructor? A.


Paramet erless
B. Cant be overloaded
C. Implicit ly priv ate
D. Called when the class is loaded into memory
E. Called just once
F. None of the above

15. For property accessors, which of the following is not allowed? A.


Public property , private accessor
B. Protected internal property , priv ate accessor
C. Protected property , internal accessor
D. Internal property , priv ate accessor

16. Which class can be used as a base class?


A. Abstract
B. Sealed
C. Static
D. internal class defined in another assembly

17. Which of the following statement s is false?


A. An abstract class has at least one abstract met hod
B. All abstract met hods are pure v irtual functions
C. An abstract met hod can only exist in an abstract class
D. The derived class must implement all the abstract met hods or be marked as an
abstract class
E. None of the above

18. int ? a = 100;


What is false for this statement ? A. a
is a nullable ty pe variable
B. Compiler converts this to Nullable< int> a = 100?
C. This line is an error
D. a = null is valid

19. What is false?


A. All Array s inherit from the Array class
B. We can iterate using a foreach loop
C. Array s are a reference ty pe
D. Double dimension array s can be sorted using Array .Sort

20. Which is not valid LINQ?


i) from a in b where a.i > 0 select a.j
ii) b.Select(a=> a.j).Where(a=> a.i> 0)
iii) b.Where(a=> a.i> 0). Select(a=>
a.j) A. Only i
B. Only ii
C. Only iii
D. ii and iii

21. In FormsA uthentication, the following met hod deletes the authentication cookie. A.
FormsA uthentication.Cookie.Delete
B FormsA uthentication.Logout
C. FormsA uthentication.SignOut
D. FormsA uthentication.Cookie.Remov e

22. Which of these is available in a Redirect but not in subsequent requests?


a. ViewBag
b. ViewData
c. TempDat a
d. Session variable

23. How do y ou override the bundling setting of web.config?


a. write code in BundleConfig.cs and set the EnableOptimizat ions
property of the BundleTable class
b. write code in BundleConfig.config and set the EnableOptimizat ions property of the
BundleTable class
c. write code in BundleConfig.cs and set the EnableOptimizat ions property of the
BundleCollection class
d. write code in BundleConfig.config and set the EnableOptimizat ions property of the
BundleCollection class

24. To achieve Minificat ion in asp.net mv c


a. Set minificat ion = true in compilat ion section in web.config
b. Set minificat ion = false in compilat ion section in web.config
c. Set debug = true in compilat ion section in web.config
d. Set debug = false in compilat ion section in web.config

25. To show a partial v iew in asp.net mv c with a met hod that returns a ht ml string we use
a. Ht ml.Part ial()
b. Ht ml.RenderPart ial()
c. Ht ml.RenderA ction()
d. Ht ml.RenderV iew()

26. To allow a met hod to be called from a Webservice, do the following


A. Keep it as a public met hod
B. Keep it as a public static met hod
C. Keep it as a public met hod with a WebMet hod attribute
D. Keep it as a public static met hod with a WebMet hod attribute

27. Which class do we inherit from while interacting with the Entity Framework A.
Entity
B. Framework
C. DbContext
D. DataContext

28. Which of the following statement s is true?


A. A command can be executed from a closed connection
B. A Datareader cannot contain more than one set of data
C. A DataSet can only have one dataTable
D. A DataAdapter need not have an open connection to call its f ill
met hod

29. What does the SoapFormat ter serialize A.


met hods of a class
B. public variables and properties of a class
C. public and private variables of a
class
D. public and priv ate properties of a class

30. To add a Primary key constraint on the DataTable


A. pass a DataColumn array object to the Primary Key property for the DataSet
B. pass a DataColumn object to the Primary Key property for the DataSet
C. pass a DataColumn array object to the Primary Key property for
the DataTable
D. pass a DataColumn object to the Primary Key property for the Datatable

31. To see records from a DataTable in a sorted manner use…


A. Sort property of DataTable
B. Sort property of DataView
C. Sort property of DataSet
D. Sort property of DataColumn

32. How do y ou run a met hod in a new thread


a. Create a thread object and pass a met hod as a paramet er to the constructor
b. call thread.Run()
c. call thread.Start()
d. call thread.BeginInvoke()

33. Which of these provides a read only , forward only way of reading records
a. DataTable
b. DataView
c. DataSet
d. SqlDataReader

34. Which of these does not require ty pecasting while accessing it


a. ViewBag
b. ViewData
c. TempDat a
d. Session variable

35. Which met hod of the DataSet returns the records whose RowState is not Unchanged
a. Accept Changes
b. Reject Changes
c. Get Changes
d. Update

36. In a WCF service the following describes the WCF service in detail
a. Proxy Class
b. WSDL
c. Mex endpoint
d. Disco file

37. What attribute is used to mark a met hod in a ServiceContract?


a. ServiceContract
b. DataContract
c. DataMember
d. OperationContact

38. Duplex WCF service uses the following binding


a. WsDuplex Ht tpBinding
b. WsDualHttpBinding
c. WebHttpBinding
d. BasicHttpBinding

39. To add a new row to a Datatable …


a. call the Add met hod of the Rows collection of the DataSet
b. call the Add met hod of the DataTable
c. call the Add met hod of the Rows collection of the DataTable
d. call the Add met hod of the DataSet

40. Restful WCF service uses the following binding


a. WsDuplex Ht tpBinding
b. WsDualHttpBinding
c. WebHttpBinding
d. BasicHttpBinding

You might also like