Professional Documents
Culture Documents
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
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
A. 1, 2
B. 2, 4
C. 4, 5
D. 1, 2, 4
A. Only 1, 2, 3
B. Only 1, 2
C. Only 1, 2, 4
D. Only 4
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
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.
A. 1, 3
B. 2, 4, 5
C. 3, 5
D. 1, 2, 3
A. 1, 2, 5
B. 1, 3, 5
C. 2, 4
D. 3, 5
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
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
A. 1 and 2 only
B. 1, 2 and 3 only
C. 2, 3 and 4 only
D. None of the above
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
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. 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);
}
}
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
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
A. 1 and 2 only
B. 3 and 4 only
C. 5 only
D. 1, 2 and 5 only
A. 1 only
B. 2 and 3 only
C. 4 and 5 only
D. All of the above
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
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
48. Which methods provided by the dataset object to generate XML in ADO.Net?
A. ReadXML
B. GetXML
C. Writexml
D. All of Above
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
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
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
A: TcpListener
B: UdpClient
C: TcpClient
D: UdpListener
A. Data Templates
B. Control Templates
C. Item Panel Templates
D. All of the above
A . mscorlib.dll
B. milcore.dll
C. mscoree.dll
D. All of the above
A. SqlClient
B. OleDb
C. Odbc
D. All of the above
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
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
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
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.
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
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
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.
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.
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
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
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
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
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
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]
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
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.
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.
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
114. performs the necessary conversions in data formats between managed and
unmanaged code.
1. Marshaling 2. CLR
3. . Net framework 4. CTS
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
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
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.
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.
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
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
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
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
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
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
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’?
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
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
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
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
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
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
28) The error message appears next to the control which display method is use…
a)summary
b)inline
c)custom
d)none
30) if you want to allow multiple valid pattern, use which validator to separate expression.
a) ()
b)*
c)?
d) |
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
126. What is the transport protocol you use to call a Web service?
A. HTTP
B. SMTP
C. TCP
D. SOAP
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
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
161 What attribute must be set on a validator control for the validation to work?
A) Validate
B) ValidateControl
C) ControlToBind
D) ControlToValidate
166 Which method do you invoke on the Data Adapter control to load your generated dataset?
A) Fill( )
B) Read( )
C) ExecuteQuery( )
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
175 Which control is used to sort the data and allow paging?
A) Datalist
B) Repeater Control
C) DataGrid
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
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
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
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
15) If one uses ASP.NET configuration system to restrict access which of the
following is TRUE?
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
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)
Answers : D
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
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
32) To set page title dynamically in ASP.NET which of the following is used?
a) Application
b) System
c) ROOT (ANS)
d) None of the Above
a) Systems.Diagnostics classes
b) Runtime Debugger
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)
37) Which of the following denote value that can be taken by Cache-Control of
ASP.NET?
a) Public
b) Private
c) no-cache
a) Call SETFOCUS
b) Call SETCONTROL
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)
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
Answer : A
46) The Following are the minimum requirement to run Asp.net pages
a) Java Virtual Machine
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.
50) The Asp.net server control, which provides an alternative way of displaying
text
on web page, is
52) < asp : listitem > tag replaces which of the following HTML tags
b) < UL >
b) Page_Init()(ANS)
c) Page_click()
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 ( )
b) One (ANS)
c) None
a) No (ANS)
b) Yes
a) TagPrefix
c) Assemblyname
d) All of the above (ANS)
a) System.Web.UI.Customcontrols.Webcontrol
b) System.Web.UI.Customcontrol
c) System.Web.UI.Webcontrol (ANS)
a) HTTP
b) SOAP (ANS)
c) TCP
d) SMTP
c) No use
a) .Asmx
b) . Ascx (ANS)
c) .Aspx
a) 20 Sec
b) 20 Min (ANS)
c) 1 hr
a) Session Objects
b) application Objects
c) Viewstate
d) Cookies
e) All of the above (ANS)
a) Output Caching
b) DataCaching
a) InProcess (ANS)
b) StateServer
c) SQL Server
d) All of the above
a) FieldValidator
b) RegularExpressionValidator (ANS)
c) RangeValidator
d) PatternValidator
a) SQLISAPI.dll (ANS)
b) SQLXML.dll
c) LISXML.dll
d) SQLIIS.dll
a) Windows
b) Anonymous (ANS)
c) Basic Authentication
d) None
a) Querystate (ANS)
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
a) Session.Close ( )
b) Session.Discard ( )
c) Session.Abandon (ANS)
d) Session.End
a) Remoting
b) WebServices (ANS)
c) Xml documentary Files
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)
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
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
b) Using SQLDataReader
c) Using SQLCommand
d) None
a) Execute (ANS)
b) EndTransaction
c) BeginTransaction
d) Open
a) Yes (ANS)
b) No
d) None
a) No Difference
b) JAVA
c) COBOL
99) Which of the following extension does a webservice file will have
a) .Asmx (ANS)
b) .Aspx
c) .Ascx
d) .Resx
a) Public Key
b) Private Key
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
b) 20 mins
c) 2 mins
d) 2 sec
a) Integer
b) String
c) Date
114) Select the output of the statement < form method=post action=”test.aspx”>
b) Transfers all the form data to test.aspx with out HTTP headers
c) None
d) None
a) System.Web.Ui.Forms.Security
b) System.Web.Security
c) System.Web.Configuration
c) System.Web.Services
a) The Prerender
b) Render (ANS)
c) Page_Load
d) Display
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
b) Add reference of dll file and place the code where ever
required
(ANS)
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
125) Find the term: The .NET framework which provides automatic memory
management
using a technique called
a) Serialization
c) Assemblies
d) Overriding
b) Application objects
c) ViewState
127) What is the base class from which all Web forms inherit?
a) Master Page
c) Session Class
129) Which of the following must be done in order to connect data from some
data
resource to Repeater control?
a) Server.Transfer (ANS)
b) Response.Redirect
c) Both A) and B)
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
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
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:
138) Which of the following can be used to add alternating color scheme in a
Repeater control?
a) AlternatingItemTemplate (ANS)
b) DataSource
c) ColorValidator
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
c) .NET RMT
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
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) 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
a) inetinfo.exe
b) aspnet_isapi.dll
c) aspnet_wp.exe (ANS)
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
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) 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
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
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. C# supports interfaces.
b. C# also provides support for structs.
c. C# provides component-oriented features
d. All
3. An assembly is?
a. &
b. <<
c. ~
d. |
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#?
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
}
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. 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. 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
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
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 + ", ");
}
}
}
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. Yes
b. Yes, but only three
c. No
d. Both a and b.
a. Designation
b. Name
c. ControlName
d. Id
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. 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
a. Yes
b. No
c. Both
d. None
private A(){}
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
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?
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
A. 1, 2
B. 2, 4
C. 4, 5
D. 1, 2, 4
Option C
Answer : D
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
Answer : C
22
A. Only 1, 2, 3
B. Only 1, 2
C. Only 1, 2, 4
D. Only 4
Answer : B
23
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
Option A
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
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
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
Option 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
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
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
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
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
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
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
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
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
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
answer : D
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
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
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
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
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
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
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
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
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(){}
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
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()
==================================================================
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
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);}
}
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;
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
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
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
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
======================================================================
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
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>
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>
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
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
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
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()
27. Which class do we inherit from while interacting with the Entity Framework A.
Entity
B. Framework
C. DbContext
D. DataContext
33. Which of these provides a read only , forward only way of reading records
a. DataTable
b. DataView
c. DataSet
d. SqlDataReader
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