C# Programming Concepts and Errors
C# Programming Concepts and Errors
A. explicitly internal
B. explicitly static
C. implicitly static
D. implicitly internal
D Web service technology is based on?
A. SOAP and TCP/IP
B. TCP/IP and UDP
C. UDP and XML
D. XML and SOAP
CD Web service technology is based on what? (choose 2)
A. TCP/IP
B. UDP
C. XML
D. SOAP
B Which sentence is correct?
A. The method on which a delegate makes calls cannot have any arguments.
B. A delegate must define name of the method on which it makes calls.
C. The method on which a delegate makes calls cannot have return type.
D Which sentence is correct?
A. A class can inherit from many abstract classes.
B. An abstract class is a class that cannot be inherited from.
C. An abstract class is a class that can be sealed.
D. An abstract class is a class that cannot be instantiated.
C Which sentence is correct?
A static method is called on the object.
B. Static data describes information for individual objects.
C. Static data describes information for all objects of a class.
D. Object data describes information for all objects of a class.
A Which sentence is correct?
A. Override method and overridden base method have to have the same return type
B. Overridden base method cannot include an override modifier.
C. Override method and overridden base method don't have the same declared accessibility.
D. Override method is an instance method declaration includes a virtual modifier.
C Which sentence is correct?
A. CLR does not layout the type in memory.
B. CLR does not compile the associated CIL into platform|-specific instructions.
C. CLR is the entity in charge of resolving the location of an assembly.
D. CLR does not perform any necessary security checks.
D Which sentence is correct?
[A] An assembly is a logical compile-time mechanism.
[B] Namespace are runtime entities.
[C] Namespace is a physical run-time mechanism.
[D] A namespace is a logical compile-time mechanism
D Which sentence is correct?
A. You cannot determine total elements of an ArrayList variable.
B. Elements of an ArrayList variable can have different types.
C. You must specify total elements of an ArrayList variable before declaring it.
D. Stack is a first-in, first-out queue.
A Which sentence is correct?
A. An interface is name collection of semantically related abstract member.
B. All interface members are implicitly private.
C. Interfaces can provide an implementation of the methods
D. Interfaces can be used to define state data.
B Which sentence is correct?
A. You must specify total elements of a List<T> variable before declaring it.
B. Elements of a List<T> variable cannot have different type.
C. You cannot determine total elements of a List<T> variable
D. Type of a List<T> variable is value type only.
A Which sentence is correct?
a. Object graph is a set of related object of serialized object
b. Object graph isgraph of serialized object
c. A serialized object always has an Object graph
d. Object graph have to map to classic OO relationships
B Which sentence is correct?
a. Panel controls cannot support scroll bars
b. Panel controls are used to group related controls in a logical unit
c. Panel controls cannot contain other controls
d. Panel controls are not visible at runtime
D Which sentence is correct?
[A] A web server provides Mail Exchange service only.
[B] A web server is a collection of files and related components.
[C] A web server provides File Transfer Protocol service only.
[D] A web server is a software product in charge of hosting your web applications.
C Which sentence is correct?
[A] [Link] supports multi-file model only.
[B] Performance of single-file model is the same as of multi-file model.
[C] [Link] supports single-file model only.
[D] Performance of single-file model is better than of multi-file model.
[E] Performance of single-file model is less than of multi-file model.
C ________is .NET equivalent of Java Virtual Machine (JVM).
A. CLS
B. CTS
C. CLR
D. Base Class Library
D What is output of the following code? (see picture)
A. Display of Mammal class
B. Display of Animal class
C. Compile error
D. Display of Animal class
Display of Mammal class
C What can be signature of an application's entry point?
A. public static void Main(string s) {}
B. public static void main() {}
C. public static void Main() {}
D. public static void Main(int n) {}
A What is output of the following code?
using System;
class Program
{
delegate void Display();
static void Main()
{
Display d1 = new Display(DisplayHello);
d1():
}
void DisplayHello()
{
[Link]("Hello");
}
}
A. Compile error at line: Display d1 = new Display(DisplayHello);
B. Compile error at line: d1();
C. Hello
A What is output of the following code?
using System;
class Program
{
delegate void Display();
static void Main()
{
Display d1 = new Display(DisplayHello);
d1();
}
static void DisplayHello()
{
[Link]("Hello");
}
}
A. Hello
B. Compile error at line: delegate void Display();
C. Compile error at line: d1();
D. Runtime error
D What is output of the following code?
static void Main(string]) args)
{
[Link] newArray = new [Link]();
[Link]("August");
[Link](2010);
foreach (object oneltem in newArray)
[Link]([Link](). ToString());
}
A. Compile error
B. Runtime error
C. August
2010
D. [Link]
System .Int32
B What is output of the following code?
using System;
using [Link];
using [Link];
class Program
{
static void Main()
{
SqlConnection cn = new SqlConnection();
[Link]();
[Link]();
[Link]([Link]());
}
}
A. Open
B. Runtime error
C. Compile error
D. Closed
D What is output of the following code?
class Program
{
delegate double Unary(double n1);
static double Power(double n1, double power)
{
return ([Link](n1, power));
}
static void Main(string[] args)
{
Nest Unary ul = new Unary(Power); [Link](u1(9,3).ToString());
}
}
A. 9
B. 729
C. 3
D. Compile error
C What is output of the following code?
using System;
class Program
{
static void Main()
{
Display<System .Int32>();
}
static void Display<T>()
{
[Link](typeof(T).ToString());
}
}
A. Compile error
B. Runtime error
C. System.Int32
D. ToString()
A What is output of the following code?
using System,
using System Data;
using System [Link]:
class Program
{
static void Main0
{
SqlConnection cn = new SqlConnection(:
[Link]:
[Link](cn [Link]());
}
}
A. Runtime error
B. Open
C. Compile error
D. Closed
C What is output of the following code?
(see picture)
A. 0
B. Compile error
C. 3
D. Runtime error
D What is output of the following code?
using System;
class Program
{
static void Main()
{
Display<System.lnt32>(2010);
}
static void Display<T>(T v1)
{
[Link]([Link]());
}
}
A Compile error
B. Runtime error
C. v1
D. 2010
A What is output of the following code?
using System;
using [Link];
class Program
{
static void Main() {
SqICommand cmd = new SqICommand();
[Link]([Link]);
}
}
A. There is no output
B. Runtime error
C. CommandText
D. Compile error
A What is output of the following code? (see picture)
try
{
int n1 = 1;
int n2 = 0;
[Link]("n1 / n2 = ", n1 / n2);
}
catch (DivideByZeroException)
{ [Link]("loi chia cho 0."); }
catch (Exception)
{ [Link]("Loi khong xac dinh."); }
A. Loi chia cho 0.
B. Runtime error (Divide by zero)
c. Compile error
D. Loi khongxac dinh.
B What is output of the following code?
string cnnString = @"Data Source=localhost\SQLExpress;lnitial Catalog=Northwind;lntegrated
Security=True";
[Link] dt = new [Link]("Products");
[Link] da = new
[Link]("Select* From Products". cnnString): [Link](dt);
[Link]([Link]());
(Assume that connection string and table name is correct)
A .Running error
[Link] row of product table
[Link] colum of product table
[Link] error
B What is output of the following code?
List<int> array1 = new List<int>();
foreach (int n in array1)
[Link](array1 .ToString());
A. array1
B. Nothing
C. 0
D. Compile error
D What is output of the following code?
using System;
interface Animal
{
public void Display();
}
class Mammal : Animal
{
public void Display()
{
[Link]("Mammal");
}
}
class Program
{
static void Main()
{
Animal a = new Mammal();
[Link]();
}
}
A. Compile error at line: Animal a = new Mammal();
B. Runtime error
C. Mammal
D. Compile error at line: void Display();
C What is output of the following code?
using System;
using [Link];
class Program
{
static void Main()
{
SqlCommand cmd = new SqlCommand();
SqlDataReader dr = [Link]();
[Link]([Link]());
}
}
A. True
B. Compile error
C. Runtime error
D. False
D What is output of the following code?
using System; using [Link];
class Program {
static void Main()
{
DataTable dt = new DataTable();
[Link]([Link]);
}
}
A. Runtime error
B. 1
C. Compile error
D. 0
A What is output of the following code?
[Link] cn = new [Link]();
[Link]();
A. Nothing
B. Runtime error
C. Compile error
B Which is the most suitable statement to fill the missing code (line 12), if you want to
build an in-house XML Web service?
A. [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_ 1)]
B. [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1, EmitConformanceClaims
= false)]
C. [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_ 1, EmitConformanceClaims
= true)]
D. [WebServiceBinding(ConformsTo = [Link], EmitConformanceClaims = false)]
A Which type is a handy programming construct that allows to group name/value pairs?
Example
public enum infringementCategorny
{
[Description(''INF001'') ]
Infringement,
[Description(''INF002'') ]
OFN
}
A. Enumeration.
B. Class.
C. Delegate.
D. Interface.
C Assume that a method named DataLoad is defined to makes a list of suppliers available
by returning an ICollection interface. A Web page has a ListBox control named
IbCustomers. The Page_Load event handler for the Web page contains this code:
private void Page_Load(object sender, [Link] e)
{
IbCustomers. DataSource = DataLoad();
IbCustomers. DataTextField = "CustomerName";
}
The Web page opens without error, but no customer names are displayed. What is the problem?
[A] The code should be placed in the Page_lnit() event handler.
[B] A ListBox control cannot be bound to an ICollection interface.
[C] Miss calling the DataBind() method of the page.
[D] Miss setting the DataValueField property of the ListBox control.
C What is output of the below codes?
A static void Main(string() args)
{
int numbed1;
[Link]([Link]());
[Link]();
}
A. 1
B. 0
C. Compile error
D. null
C class Class1
{
private string name = ".NET Technology";
public string yourName
{
get { return name; }
set { name = value; }
}
public virtual void SayHello()
{
[Link]("Hello {0}", [Link]);
}
}
class Class2 : Class1
{
public Class2(string yourName)
{
[Link] = yourName;
}
public override void SayHello()
{
[Link]();
}
}
class Program
{
static void Main(string[] args)
{
Class2 obj = new Class2("Visual c#");
[Link]();
}
}
A. Hello Visual C# and .NET Technology
B. Compile error
C. Hello Visual C#
D. Hello .NET Technology
B What is output of this code?
class Student
{
internal string studentNo;
}
class Program
{
static void Main()
{
Student s = new Student();
[Link] = "01234";
[Link]([Link]);
}
}
A. Runtime error
B. 01234
C. Compile error
D. Nothing
B What is name of this web service?
[WebService(Namespace = "[Link]
Name="My Webservice")]
[WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
[System. [Link](false)]
public class WebServicel : [Link]
{
[WebMethod]
public string HelloWorld()
{
return "Hello World";
}
A. HelloWorld
B. My Webservice
C. WebServicel
[Link] Service
D Study the following code and choose one correct sentence.
using System;
using [Link];
class Program {
static void Main() {
ArrayList arr1 = new ArrayList();
[Link](arr1 .Capacity);
}
}
A. To run this code, you must using another namespace is [Link].[B]
B. This code will raise a runtime error.
C. This code has error at line: [Link](arr1 .Capacity);
D. Output of this code is 0.
C Does the following code have any errors?
class Program
{
static void Input(ref string s1)
{
[Link]("Enter a string:");
s1 = [Link]();
}
static void Main()
{
string s2;
Input(ref s2);
}
}
A. Yes, there is an error at line: string s2;
B. No, there are not any errors.
C. Yes, there is an error at line: lnput(ref s2);
D. Yes, there is an error at line: static void lnput(ref string s1)
C class Animal {
public string Name {get; set;}
}
class Mammal : Animal {
public string Name {get; set;}
}
What is happened when compiling the program?
A. Compile error.
B. No errors, no warnings.
C. No errors, but there is 1 warning.
C SqIConnection conn = new SqIConnection(); [Link] =
CONNECTION_STRING;
SqICommand cmd = new SqICommand(); [Link] = conn:
[Link] = ''SELECT FROM tl; SELECT FROM t2; SELECT * FROM t3'';
SqlDataAdapter adapter = new SqlDataAdapter(); [Link] = cmd;
DataSet ds = new DataSet(); [Link](ds);
[Link]
[Link]
[Link]
[Link] error
B What is output when request the page that contains the code bellow? protected void
Page_Load(object sender. EventArgs e)
{
[Link]("<h1>Hello world!</h1 >"):
}
A. <h1>Hello world!</h1>
B. Hello world!
C. Compile error
D. [Link]("<h1>Hello world!</h1>")
A What is output of this code?
string s1 = "Visual C# And .NET Technology";
string s2 = [Link](0. [Link]('#')); [Link]([Link]());
A. VISUAL C
B. Visual C
C. VISUAL C#
D. Compile error
B What is output of this code? static void Main() {
int number1 = 3;
int number2 = 2;
float number3 = number1 / number2; [Link]([Link]());
}
A 1.5
B. 1
C. compile error
C Assume that BaseClass is a class; IFaceland IFace2 is interface. Which of the following
declarations is INVALID?
/Line 1/ class ImplDerivedClass: IFace2, BaseClass, IFace1 {}
/Line 2/ class ImplClass: IFace1, IFace2 {}
/Line 3/ class DerivedClass: BaseClass, IFace1 {}
/Line 4/ class DerivedClass: IFace2. IFace1. BaseClass {}
A The lines 2 and 3
B. The lines 3 and 4
C. The lines 1 and 4
D. The lines 1 and 2
D Why the data is not inserted using the following code?
A. Compile error
B. 1
C.0
D. -1
A class Animal
{
public void Display()
{
[Link]("animal");
}
}
class Mammal : Animal
{
public new void Display()
{
[Link]();
[Link]("Mammal");
}
}
static void Main(string[] args)
{
A. Hello
B. Hello {0}
C. Visual C#
D. HelloVisual C#
B The scope of a variable runs from the point of declaration to the end of the ....
A. method.
B. enclosing block.
C. application.
D. class.
A Which sentence about the C# class types Is correct?
A. C# classes can define some constructors.
B. C# classes can define any number of destrterm-208uctors.
C. C# classes can define only one constructor.
D. C# classes do not support destructors.
A Which sentence about Application variables is correct?
A. You cannot change value of an Application variable.
B. Application variables cannot be shared among all users.
C. Application variable is maintained by an instance of the HttpApplicationState type.
D. Application variables cannot be shared across all pages.
A Which sentence about foreground threads is correct?
A. Foreground threads have the ability to prevent the current application from terminating.
B. You can set a thread is foreground thread by using IsForeground property.
C. You cannot create any foreground threads.
D. Foreground threads are viewed by the CLR as expendable paths of execution that can be
ignored at any point in time.
D Which sentence about DataReader object is correct?
A. You can create DataReader object by new keyword.
B. DataReader object can return some records at a time.
C. DataReader object contains a property that gets number of records.
D. DataReader object represents a read-only, forward-only stream of data.
C Which sentence about shared assemblies is correct?
A. Shared assemblies can be *.exe files.
B. Shared assemblies are intended to be consumed by the application which resides in the same
directory of them.
C. Shared assemblies are deployed to GAC.
C Which sentence about MDI application is correct?
A. Ina MDI application, if the user maximizes a particular child window, you have to merge the
child's menu system with the parent.
B. MDI applications do not allow user to have multiple child windows open at the same time
within the same topmost window.
C. MDI applications allow you to "merge menus''.
C Which sentence about working with directories is correct?
A. You cannot use the Directorylnfo class for operations such as copying, moving, renaming,
creating and deleting directories.
B. All methods of DirectorylInfo class are static.
C. All methods of Directory class are static.
D. You cannot use the Directory class for operations such as copying, moving, renaming,
creating and deleting directories.
B Which sentence about web services is correct?
A. Web services can be written in C# only.
B. Web services allow invoking methods and properties of a remote object using standard HTTP
request.
C. Web services can be run on Windows systems only.
D. Programs that are written in Java cannot use the web service which is created by a .NET
language.
B Which sentence about Cookie is correct?
A. Cookie is used to maintain sensitive information about the current user.
B. Cookie is often realized as a text file on the user's machine.
C. The exact location of cookie files does not dependent on which browser is using.
D. Cookie is often realized as a text file on the web server.
B Which sentence about thread pool is correct?
A. Default priority of a thread in thread pool is BelowNormal.
B. The thread pool manages threads efficiently by minimizing the number of threads that must be
created, started, and stopped.
C. You can set priority for a thread in thread pool.
D. Threads in thread pool are always foreground threads.
B Which sentence about code library is correct?
A. A code library must take a *.dll extension.
B. A code library can be an executable file.
C. You cannot create a code library in C#.
D. You cannot reuse the library which is written by C# in any other .NET programming
language.
A Which sentence about BufferedStream is correct?
A. BufferedStream provides temporary storage for a stream of byte that may be committed to
storage at a time.
B. BufferedStream is used to store textual information to a file.
C. BufferedStream provides random access to streamed data stored in memory rather than a
physical file.
D. BufferedStream allows for random file access with data represented as a stream of bytes.
A Which sentence about single-file assemblies is correct?
A. If an assembly is composed of a single module, you have a single-file assembly.
B. Single-file assemblies are *.dil only.
C. Single-file assemblies do not contain all the necessary CIL, metadata, and associated
manifesting an autonomous, single. well-defined package.
D. Single-file assemblies are *.exe only
A Which sentence about properties is correct?
A. Properties can be static.
B. Properties have only set block.
C. Properties must have set and get block.
D. Properties have only get block.
B Which sentence about WSDL is correct?
A. WSDL is executed by the client.
B. WSDL is used to describe information about the web service.
C. WSDL is based on HTML.
D. WSDL is executed by the web server.
A Which sentence about value types is correct?
A Value types must derive from [Link].
B. Value types can override [Link]() method.
C. Variables of a value type are passed by reference by default
D. Value types are allocated on the managed heap.
A Which sentence about .NET assemblies is correct?
A. NET assemblies are versioning, self-describing and configurable.
B. NET assemblies are versioning, self-describing, but not configurable.
C. NET assemblies are versioning, configurable, but not self-describing.
D. NET assemblies are configurable, self-describing, but not versioning.
D Which sentence about namespace is correct?
A. Classes from one namespaces cannot reside in many assemblies.
B. Namespaces are physical mechanism.
C. Namespaces are runtime entities.
D. Classes from many namespaces can reside in one assembly.
A Which sentence about Application Domain is correct?
A. The CLR is able to load and unload a formal process much quicker than Application
Domains.
B. The CLR does not create automatically any Application Domains at the time the process
launches.
C. A single process cannot host some Application Domains.
D. Application Domain is a logical partition within a process
B Which sentence about HTML form is correct?
A. An HTML form is located at header of web page.
B. An HTML form is a named group of related Ul elements used to gather user input.
C. An HTML form is entire display area shown by a given browser.
D. An HTML form is placed outside of <body> section.
B Which sentence about background threads is correct?
A. Background threads have the ability to prevent the current application from terminating.
B. Background threads are viewed by the CLR as expendable paths of execution that can be
ignored at any point in time.
C. By default, every thread that is created via the [Link] method is automatically a
background thread.
D. You cannot create any background threads.
A Which sentence about components is correct?
A. An example of components is OpenFileDialog.
B. Most of components are not visible at runtime.
C. Components are types that derive from the Control base class.
D. Cannot configure components at design time.
A Which sentence about Session variables is correct?
A. Session variable is maintained by an instance of the HttpApplicationState type.
B. Session variables cannot be shared among all users.
C. You cannot change value of a Session variable.
D. Session variables cannot be shared across all pages.
D Which sentence about [Link] View State is correct?
A. You cannot add some values to View State data.
B. View State data is embedded in a hidden formfield, which will flow between the browser and
a specific page.
C. View State data is resided in a server variable.
D. View State data can be transferred between [Link] web pages
B Which sentence about .NET assemblies is correct?
A. .NET assemblies are described using COM type libraries.
B. .NET assemblies take the same file extension as COM servers.
C. .NET assemblies are registered into the system registry.
D. .NET assemblies export methods to facilitate communications with the COM runtime.
A Which sentence about DataSet is correct?
A. A DataSet is an in-memory representation of external data.
B. When working with DataSet a connection must be established with the data source.
C. When we changes data in a DataSet this change is automatically updated to the data source.
D. DataSet is used to fetch and update data.
B Which sentence about enumerations is correct?
[A] By default the storage used to hold each item of an enumeration is a floating-point value.
[B] Enumerations are a handy programming construct that allow you to group name/value pairs.
[C] You cannot alter the storage slot used to hold each item of an enumeration.
A Which sentence about Connection object is correct?
A. Connection object is used to establish a session with the data source.
B. Connection object is used to obtain information from a data source.
C. Connection object is used to execute a SQL command.
D Which sentence about strong name is correct?
a. Strong name in only friend name of the assembly
b. Strong name includes no more than 128-bit numbers
c. You must create a strong name when building a private assembly
d. Strong name is used to uniquely identify the publisher of a .NET library.
C which sentence about default context is correct?
a. default context is context1.
b. default context is the last context created within an application domain
c. default context is used to group together .NET objects that have no specific or unique
contextual needs.
d. Only default application domain has default context
D which sentence about the following code is correct?
StreamWriter sw = new StreamWriter("[Link]")
[Link] file "[Link]" does not exist, this code will raise an exception
[Link] file "[Link]" exist, this code will append to this file
c. if file "[Link]" exist, this code will raise an exception
D. if file "[Link]" does not exist, this code will create a new file
A Which sentence about ViewState is correct?
[A] Values of each GUI widget on the page are stored in a hidden form field.
[B] Values of each GUI widget on the page are included in a no-encoded string.
[C] Values of each GUI widget on the page will be destroyed after a period of time.
[D] Values of each GUI widget on the page are stored in a server-side variable.
B Link Lable is commands control?
[A] False
[B] True
[C] There is no link label control
A Session variables can be any valid .NET Framework type?
A .Yes
B. No
C can we cancel closing a form?
a. Yes, by using FormClosed event
b. No
c. Yes, by using FormClosing event
B can we draw a hexagonal with GDI+?
a. Yes, by using DrawHexagonal method of Graphics object
b. Yes, by using DrawPolygon method of Graphics object
c. NO
D Can we work with server-side code on HTML controls?
A. No
B. Yes, we can do it without any changes on HTML controls.
[Link], by setting value for "runat" property of HTML controls is "client".
D. Yes, by setting value for "runat" property of HTML controls is "server".
C Can we use methods that have some arguments for a delegate?
A. No
B. Yes, but methods have to only one argument.
C. Yes
C Does C# support multi inheritance? (Choose the most correct answer)
A. Yes. but only for inheritance from many interfaces.
B. No
C. Yes
B Will the "finally" block get executed if an exception has not occurred?
A No
B. Yes
A Thread is executed when we create a new instance of a Thread object
A . False
B. True
B By default can we delete a folder that contains subdirectories and files?
A. Yes
[Link]
A A C# class can be inherited from multiple interfaces?
A. Yes
B. No
B Does Microsoft supply data provider for Oracle database?
A. No
B. Yes
B Does DataTable class support a method that allows obtaining the data reader-like
navigation scheme?
A. No
B. Yes
C Does "return 10 as long" compile?
A. No, because there is no as operator in C#
B. Yes
C. No, because long is not a reference type
D. No, because 10 cannot be cast to long
C What is default value of AutoPostBack property?
A. True
B. 1
C. false
D. 0
B Can we create a custom Windows Forms control in C#?
A. No
B. Yes
C Can we check whether an .aspx page is posted back to the server?
A. Yes, by using IsPostForward property of Page class.
B. No
C. Yes, by using IsPostBack property of Page [Link]
A A web service which conforms to WSI basic profile 1.1 can include some methods that
have the same name.
A. No
B. Yes
A Can a namespace be resided into many assemblies?
A. Yes
B. No
B DataSet object is one of the components of the data provider,
A. TRUE
B. FALSE
A The Mask property of MaskedTextBox specifies or retrieves the characters to be used as
a mask.
A. TRUE
B. FALSE
B You have a code library that was written by C#. Can you use this library with [Link]?
A. No
B. Yes
A We CANNOT use methods that have some arguments for a delegate?
A. No
B. Yes, but methods have to only one argument.
C. Yes
A Assume that you create a Web service by Visual C# language. Can you consume this
Web service by a client that is written in Java language?
A. No
B. Yes
A MessageBox is a type of dialog box
A. TRUE
B. FALSE
C Responsibilities of CLR are compiling source codes into an assembly and loading the
type into memory.
A. Yes.
B. No, responsibilities of CLR are loading the type into memory and compiling CIL into
platform-specific instruction.
C. No, responsibilities of CLR are compiling source codes into an assembly and resolving the
location of an assembly.
D. No, responsibilities of CLR are compiling source codes into an assembly and executing the
code.
A Can we connect to SQL Server Database without using SqIConnection?
(A) A given class (or structure) may define only a single static constructor
(B) A static constructor executes exactly one time, regardless of how many objects of the type
are
Created
(C) A given class (or structure) may define many static constructors
A. Statement 1 is correct
B. Statement 2 is correct
C. Statement 3 is correct
Neat
D. All statements are correct
D It is important to understand that the value assigned to a constant variable must be known
at_______
A. Debug-time
B. Run-time
C. None of the others
D. Compile time
C Which of the following can be used to add alternating color scheme in a Repeater
control?
A. DataSource
B. ColorValidator
C. AlternatingItemTemplate
D. None of these
D Which of the following can be used to debug .NET application?
A. Visual Studio .NET
B. Runtime Debugger
C. [Link] classes
D. All of the above
B Which of the following can be defined as generic? (Choose one answer)
A. Delegates
B. All of the others
C. Methods, Classes, Interfaces
D. Structures
B What does [Link] will do?
A. It will stop the client process
B. It will stop the server process
B How many times are .NET programs compiled?
A. 1
B. 2
C. 3
D. 4
C How many parts of a .Net assembly version?
A. 1
B. 2
C. 4
D. 3
C How many interfaces a class can implement?
A. A class cannot implement any interfaces.
B. Only one.
C. Many.
C How many [Link] Files an ASP .NET application can have?
A. An ASP .NET application don't have [Link] file
B. Only 1
C. Greater than or equal 1.
D How many classes can a single .NET DLL contain?
A .3
B .1
C.2
D .As much as you want
A Which event is raised when user choose an item in ComboBox control?
A. SelectedIndexChanged
B. Click
C. Validated
D. DropDown
D See picture:
A. The code will not compile successfully because myClass is a readonly variable, which also
means it is static. You can
B. The code will not compile successfully because myClass is a readonly variable and you
cannot change value of a read
C. The code will not compile successfully because a readonly class instance cannot access its
internal data.
D. The code will execute and print out: 100
D Which control is used to display text only?
A. TextBox
B. RadioButton
C. CheckBox
D. Label
C In Windows Form application, which control is used to display text when the mouse
points to a particular control?
A. Status Strip
B. ToolStrip
C. ToolTip
D. MenuStrip
B Which control allows selecting more than one item?
A ComboBox
B. ListBox
C. DateTimePicker
D. TextBox
C Which control combines the features of the TextBox and the ListBox controls?
A . StatusBar
B. Label
C. ComboBox
D. ToolBar
B Which control is a kind of selection list controls?
A Label
B. ComboBox
C Button
D. TextBox
B Which control is a kind of value setting controls?
A. GroupBox
B. ListBox
C. Text Box
D. CheckBox
A which control support paging
A, data grid
B, repeater
C, none
D, both
C You want to add a control to your form that allows you to set a particular option on or
off. Which control would you choose?
[A] Button
[B] ListBox
[C] CheckBox
[D] CheckedListBox
A Which control is used to display a short, customized help message for individual controls
on a form?
[A] ToolTip
[B] HelpText
[C] HelpTool
[D] ToolClass
C Which control is not used to receive information?
A. ComboBox
B . TextBox
C. Label
D . ListBox
B Which Control is used to display the current status of the application using framed
windows?
[A] TreeView
[B] StatusBar
[C] ToolBar
[D] ListView
C "public", "private", "protected", "internal", "protected internal" keywords are called:
A. Modifiers
B. Delegates
C. Access modifiers
D. Types
D Which method of Command object can be used to update an existing record in one table
of database?
A. ExecuteReader
B. ExecuteScalar
C. ExecuteXmlReader
D. ExecuteNonQuery
B Which method of the Control class conceals the control from the user?
A. Hide
B. Visible
C. Dispose
D. Close
C Which method is fired lastly during the page load?
A Init()
B. Load()
C. Unload()
D. PreRender()
A Which method do you invoke on the Data Adapter control to load your generated dataset?
(A) Fill( )
(B) ExecuteQuery( )
(C) Read( )
C Which method displays the custom control
A. Display
B. Page_Load
C. Render
D. The Prerender
D What is state of a thread after creating a Thread object and call the [Link]()
method?
A. Stopped
B. Started
C. Unstarted
D. Running
D What is the type of Processing model in Web applications?
A. Request-Response
B. Linear
C. Static
D. Event-driven
A An interface CANNOT contain signatures of the following members:
A. Constructor
B. Events
C. Methods
D. Properties
A Unboxing is
A. Explicit conversion
B. Implicit conversion
D When do we use virtual keyword?
A. When we want to define a constructor.
B. When we want to define an override method.
C. When we want to define an overridden base method.
D. When we want to define a destructor.
B Which event handler is fired when a new user logs on to your application?
A. Application_Start()
B. Session_Start()
C. Application_End()
D. Session_End()
C What is utility allows you to view the set of all content files and referenced assemblies?
A. Class View.
B. Code Definition Window.
C. Solution Explorer.
D. Object Browser.
A A command builder is only able to autogenerate SQL commands for use by a data
adapter, if
A. The Select command interacts with only a single table, the single table has been attributed
with a primary key, and the column(s) representing the primary key is accounted for in you
B. The Select command interacts with only a single table.
C. .NET does not support to autogenerate SQL commands.
D. The Select command interacts with only a single table and the single table has been attributed
with a primary key.
A What is utility shows all of the types in your current project from an object-oriented
perspective?
A. Object Browser.
B. Code Definition Window.
C. Solution Explorer.
D. Class View.
D Which of following extension does a Web service file will have?
A. ascx
B. aspx
C. resx
D. asmx
D Boxing is
A. Convert a numeric value to object
B. Convert an object to a value type
C. Convert a string to a numeric value
D. Convert a value type to a object
C Which object provides the ability to connect to and disconnect from the data store?
A. Command
B. DataAdapter
C. Connection
D. DataReader
C What is term for conversion from a value type to an object?
A. Explicit conversion.
B. Implicit conversion.
C. Boxing
D. Unboxing.
B Which sentences are correct?
A. A form is only used to receive information from the user.
B. A form is a class.
C. A form is only used to present information to the user.
D. A form is not a control.
c What are client-side script languages?
A. VBScript only.
B. JavaScript only.
C. VBScript and JavaScript.
D. Visual C#, Visual [Link] and Visual J#.
C By setting the Text property on the form, you will cause the value of the Text property to
display on which part of the form?
A. Status bar
B. Top-right corner
C. Title bar
D. Bottom-right corner
C What is different between namespaces and assemblies?
A. A namespace can contain many classes, but an assembly can include only one class.
B. A namespace can contain only one class, but many classes can reside in an assembly.
C. Namespaces are logic entities, but assemblies are physical mechanism.
D. Namespaces are physical mechanism, but assemblies are logic entities.
C Which access modifier marks a member as accessible only by the class or any derived
classes?
A. Private
B. Internal
C. Protected
D. Public
D In [Link] application,________ and___________ variables can be accessed by all the
pages in the application.
A. Application, Request
B. Global, Session
C. Server, Response
D. Session, Application
C ... enables the possibility for a function to be polymorphic when it is overridden in one or
more inherited classes.
A. static
B. parameterized
C. virtual
D. overridden
A Interface references CANNOT be obtained through:
A. Explicit cast
B. The is keyword
C. The as keyword
B .NET Framework has two main components, are
A. Common Language Runtime and [Link]
B. Common Language Runtime and .NET Framework class library
C. .NET Framework class library and [Link]
D. Common Language Runtime and Windows Forms Application
AD .NET Framework has two main components, are (CHOOSE 2)
[A] .NET Framework class library
[B] [Link]
[C] Windows Forms Application
[D] Common Language Runtime
C Which type in C# is a kind of value-based types?
A. Class
B. Interface
C. Enumeration
D. Delegate
A Which of the following classes can be used to read/write textual information from/to a
block in memory?
A. StreamReader/StreamWriter
B. StringReader/StringWriter
C. File
D. BinaryReader/BinaryWriter
D Assume you wish to build a Web page to show list of products in database. at is the most
suitable met for this task?
A. Use XML
B. Use Client-Side scripting
C. Use HTML
D. Use Server-Side scripting
B Which element of a .NET assembly defines numerous flags that enable the runtime to
understand the layout of the managed file?
A. CIL code
B. A CLR file header
C. A Win32 file header
D. Type metadata
C What is state of a thread after creating a Thread object?
A. Started
B. Stopped
C. Unstarted
D. Running
A Which type of the System. Threading namespace can be used to resolve the issue of
concurrency?
A. ThreadPool
B. Timer
C. Monitor
D. Thread
A Which event we can place code in which to initialize variables once during session start?
A. Session_Start
B. Application_Start
C. Session_End
D. Application_End
C custom control created using C# need to be saved using the extension
A, ASMX
B, CS
C, ASCX
D, ASPX
C how do you register a user control
A, add tag prefix tag name
B, add source, tag prefix
C, add Src, tag prefix tag name
C Which building block is a formal specification that describes how types must be defined
in order to be hosted by CLR?
A. CLR
B. The base class library
C. CTS.
D. CLS
C What is a "type" in the world of NET? (Choose the most correct answer)
A. Type is a generic term used to refer to a member from the set {class, structure, interface}.
B. Type is a generic term used to refer to a member from the set {class, structure}.
C. Type is a generic term used to refer to a member from the set {class, structure, interface,
enumeration, delegation}.
D. Type is a. generic term used to refer to a member from the set {class, structure, interface,
enumeration}.
A Which property of form to get or set the button control that will be clicked when the user
presses the Esc key?
A. CancelButton
B. EscButton
C. AbortButton
D. AcceptButton
B Which Windows Forms control can be used to get characters from keyboard?
A. Label
B. ComboBox
C. CheckBox
D. ListBox
B What does the keyword ''virtual'' declare for a method?
A. The method cannot be accessible.
B. The method can be overridden
C. The method cannot be overridden
D. The method cannot be inherited.
B What are required services in an [Link] Web server?
A. World Wide Web Publishing and HTTP SSL
B. IIS Admin World Wide Web Publishing
C. Messenger and lIS Admin
D. HTTP SSL and Messenger
C Which sentence is NOT correct?
A. Explicit conversions are kind of type conversions.
B. Explicit conversions require a cast
C. Explicit conversions are guaranteed to success
D. With explicit conversions, information might be lost.
B What is reason for using client-side scripting?
A. To query data from database.
B. To validate user input before posting back to the web server
C. To implement codes required high security.
D. To upload a file to the web server.
c What are system exceptions?
A. System exceptions are custom exceptions that derive from the [Link] type.
B. System exceptions are errors when compiling project
C. System exceptions are exceptions that are throw by the CLR
B ____ are the visual effects supported in Windows Forms applications
A. Control Anchoring, Class Libraries, Transparent Forms
B. Transparent Forms, Control Docking, Control Anchoring
C. Class Libraries, Transparent Form, Control Docking
D. Control Docking, Control Anchoring, Class Libraries
D Which event occurs when the form is closed?
A. Closed
B. Deleted
C. Destroyed
D. Disposed
C Which keyword is used when you wish to explicitly reference the fields and members of
the current object?
A. abstract
B. base
C. this
D. virtual
B Which one in the below events is fired secondly during the page load?
A. PreRender()
B. Init()
C. Unload()
D. Load()
A What is WSDL?
A. Is used to describe information about the web service.
B. Is executed by web server.
C. Is based on HTML.
D. Is executed by client
C Which property of TextBox control in Windows Forms application is used to create
password input box?
A. Multiline
B. ReadOnly
C. Password Char
D. Text
B What is name of software product that host web applications?
A. Web application
B. Web server
C. Exchange server
D. FTP server
C You are building a C# application. Your application has two assemblies: [Link] and
[Link].
Which of the following access modifiers will you use for all methods inside the assembly
[Link]?
A. private
B. public
C. internal
D. sealed
A How can we check that some changes have been made to a DataTable since it was
loaded?
A. We can use the method HasChanges() to check whether a datatable is changed or not
B. We can use the method HasNewRows to check whether a datatable is changed or not
C. We can use the property lsChanged to check whether a datatable is changed or not
A What is return value of ExecuteNonQuery() method of a Command object?
A. An integer is number of affected row
B. The Command object does not support ExecuteNonQuery() method.
C. The ExecuteNonQuery() does not have a return value.
D. An integer represents total rows that are results of SQL command.
D What is the output format of the file the C# compiler produces?
A. Byte code
B. Hex dump
C. Native Machine Code
D. IL
D In Visual Studio .NET 2008, _____ utility presents a logical view of our work using an
Explorer-like view of the classes, methods and properties.
A. Properties View
B. Solution View
C. Resource View
D. Class View
D Which class is at the top of .NET class hierarchy?
A. System.Int32
B. [Link]
C. [Link]
D. [Link]
b You need to get access to a Microsoft Excel 2003 file. Which data adapter would you
use?
A. ODBCDataAdapter
B OleDbDataAdapter
C. SqlDataAdapter
D. OleDataAdapter
C What is NOT a type in the world of NET?
A. Interface
B. Struct
C. Variable
D. Class
A Complete this sentence: At the heart of events are______
A. Delegates
B. Buttons
C. Methods
D. Threads
A Which variables can use only by one user but in all pages?
A Session
B. Application
C. ViewState
D. Cookie
B Which variables can be used by all users and in all pages?
A Session
B. Application
C. ViewState
D. Cookie
D Suppose we have multi-file assembly as follows: [Link]. parti netmodule.
[Link]. [Link].
Which file is the manifest information located in?
A In [Link]
B. Each file contains a piece of manifest information
C. In parti .netmodule
D. In [Link]
D An object that supports the______. interface stores state information for an asynchronous
operation, and provides a synchronization object to allow threads to be signaled when the
operation completes.
[Link]
B. Delegate
C. AsyncCallback
D. IAsyncResult
B The ___ method of the ____ object is used to retrieve the data in the form fields
submitted by the user.
A [Link]. Request object
B. [Link] Request object
C. [Link]. Response object
D. [Link] Response object
D The ... method of the ... object is used to redirect the user to another page.
A. [Link], Request
B. [Link], Request
C. Redirect, Request
D. Redirect, Response
C In Windows Form.______is a Command type control.
A Text
B. Label
C. LinkLabel
D. TextBox
C which the following sentence about Delegate is true?
A. Delegates cannot be used to define callback methods.
B. A delegate object can maintain a single method only.
C. A delegate object can maintain a list of methods to call.
D. Delegates do not allow methods to be passed as parameters
B What are properties of [WebMethod] attribute?
A Description and MessageName
B. Description, MessageName and EnableSession.
C. Description, MessageName and Namespace.
D. Description, Name and Namespace.
D What are properties of [WebService] attribute?
A .Description and Name.
B. Name and Namespace.
C. Description and Namespace.
D. Description. Name and Namespace.
C Which property of Form allows to set the button on the Form that is clicked when user
press the Enter key?
A . DefaultButton
B. OKButton
C. AcceptButton
D. EnterButton
C What is UDDI?
A .UDDI is a protocol to move information between consumers and web services.
B. UDDI is a language is used to build a XML web sen/ice.
C. UDDI is a language is used to describe a XML web service.
D. UDDI is the white pages for XML web sen/ices.
A What is NOT a characteristic of Web Service?
A Is registered with operating system of client
B. Is accessed over the web.
C. Is called using its Interface.
D. Uses standard Web protocols to communicate.
C Which category of [Link] namespace contains types that facilitate
interoperability with legacy ActiveX controls?
A .Components
B. Controls
C. Core infrastructure
D. Common dialog boxes
B Which kind of threads has the ability to prevent the current application from terminating?
A .Background threads
B. Foreground threads
C Which member of [Link] namespace is an enumeration?
A ThreadPool
B. ThreadStart
C. ThreadPriority
D. Thread
C What is name of templates that wrap a block of selected statements within a relevant
scope?
A. Console Application
B. Snippets
C. Surround With
D. Class Library
A What is the standard format of a .NET assembly's version number?
A <major>.<minor>.<build>.<revision>
B. <major>.<minor>.<revision>
C. <major>.<minor>.<revision>.<build>
D. <major>.<build>.<minor>.<revision>
B Which property of the Exception class specifies textual information that indicates the
reason for the error and provides possible resolutions?
A InnerException
B. Message
C. Source
D. StackTrace
B Which kind of threads is automatically killed when the application domain unloads?
A. Foreground threads
B. Background threads
B You are required to build an application that can serialize an object to a file. Then, this
file can be transferred to another program written in Java and running in Linux operating system
to be de-serialized. Which of the following classes is the best choice for the above task?
A. BinaryFormatter
B. SoapFormatter
C. NetworkFormatter
D. Formatter
C What are NOT Web Server controls?
A. [Link] controls.
B. HTML controls
C. HTML with value of runat property is server.
A __ is an object in which the data retrieved from the database can be stored.
A. DataSet
B. SqICommand
C. Command
[Link]
A What kind of memory where an object is allocated?
A. Managed heap
B. Data area
C. Stack area
D. Code area
B To help optimize the garbage collection process, each object in the heap is assigned to a
specific generation. If an object is marked as Generation 0. it means:
A. That object is an allocated object and has survived through three garbage collection.
B. That object is a newly allocated object and has never been marked for collection.
C. That object is an allocated object and has survived through one garbage collection.
[Link] object is an allocated object and has survived through two garbage collection
D For using SQL .NET Data Provider what using statement of the following is correct?
A. using [Link];
B. using [Link];
C. using [Link];
D. using [Link];
D The type of event declaration must be of _ type.
A. Constructor
B. Indexers
C. Event
D. Delegate
B In Windows Forms application.. which property is used to get or set the edges of the
control is anchored to the edges of its container?
[Link]
B. Anchor
C. Hang
D. Fixed
D What is the property of [Link] DropDownList control can make change events cause
a postback?
A. SelectedValue
B. Text
C. IsValid
D. AutoPostBack
A What are formatters you can choose when serialization an object?
A. BinaryFormater. SoapFormater and XMLSerializer.
B. TextFormater. BinaryFormatter and XMLSerializer.
C. TextFormater. BinaryFormatter and SoapFormatter.
D. TextFormater. SoapFormatter and XMLSerializer.
B How do you explicitly kill a user's session?
A. [Link]()
B. [Link]()
C. [Link]()
D. [Link]()
A What is first step to define an event?
A .Define a delegate that contains the method to be called when the event is fired.
B. Declare an event using the C# event keyword.
C. Declare an event in term of the related delegate.
D. Define a method that is called when the event is fired.
B What are enumerations?
A. Enumerations are a handy programming construct that allows to group name/value pairs.
B. Enumerations are composed of any number of members, such as properties, methods, and
events.
C. Enumerations are the .NET equivalent of a type-safe C-style function pointer.
D. Enumerations are named collections of abstract member definitions.
C How can we define an overridden base method?
A. Use sealed keyword.
B. Use new keyword.
C. Use virtual keyword.
D. An overridden base method is the same as a normal method.
B What is unboxing?
A. Unboxing is conversion from a value type to an object.
B. Unboxing is conversion from an object to a value type.
C. Unboxing is conversion from a string to an integer.
D. Unboxing is conversion from an integer to a string.
B The ... object allows us to retrieve & manipulate data In the database.
A. Connection
B. Command
C. Import
D. GetData
B It is possible to check whether an .aspx page is posted back to the server with the help of
the ... property of the page
A. IsPosted
B. IsPostBack
C. IsPostForward
D. IsPostedBack
AB Choose 2- correct statements about Server-side and Client-side codes?
A. Client side code is executed on the browser.
B. Server side code is executed at the server side on IIS in [Link] framework.
C. Server side code is executed on the browser.
D. Client side code is executed on the IIS.
AB How do we create a new text file? (choose 2)
A. Use StreamWriter class.
B. Use CreateTextQ method of Filelnfo class.
C. Use StreamReader class.
D. Use CreateQ method of Filelnfo class
AD ... variable can be accessed by all the pages in the application. (Choose 2)
A. Session
B. Global
C. Server
D. Application
B What is protected access modifier?
A. Defines a member as accessible only by the class.
B. Marks a member as accessible only by the class or any derived classes.
C. Defines a member as accessible from an object variable as well as any derived classes.
D. Marks a member as accessible limited to the current assembly, but not outside the assembly.
A Select the output of the statement <form method = "post" action = "[Link]"
A. Transfers all the form data to [Link] with HTTP headers.
B. Transfers all the form data to [Link] without HTTP headers.
C. Calls post method on [Link].
AD Name two properties common in every validation control?
A. Color property
B. CommandArgument property
C. Text property
D. ControlToValidate property
B What are responsibilities of CLR?
A. Compiling source codes into an assembly and loading the type into memory.
B. Loading the type into memory and compiling CIL into platform-specific instruction.
C. Compiling source codes into an assembly and resolving the location of an assembly.
D. Compiling source codes into an assembly and executing the code.
A The____ event of the Form control is used to perform tasks such as allocating resources
used by the form
A. Load
B. Allocate
C. Activated
D. Activate
B Which property of Control type is used to set a widget should be attached to which side
(or sides) of a Form?
[Link]
[Link]
[Link]
[Link]
A Which object provides access to the provider's data reader object?
A. Command
B. DataReader
C. Connection
D. DataAdapter
A Which object represents the actual data of a DataTable?
A. A collection of DataRow objects.
B. A collection of DataRelation objects.
C. A collection of DataColumn objects.
D. A view object.
C What is CLR?
A. CLR is a language that sits above any particular platform-specific instruction set.
B. CLR is a formal specification that documents how types must be defined in order to be hosted
by the CLR.
C. CLR is a set of rules provided to ensure that products of compilers will work properly in .NET
environment.
D. CLR is physically represented by [Link] library.
D Which sentence is correct about C# language?
A. C# language does not have pointer type.
B. You do not have to de-allocate memory in C# language.
C. C# language does not full support for interface-based programming techniques.
D. C# language does not support to overload operators.
B What is advantage of code-behind page model?
A. Pages are easier to deploy or send to another developer.
B. It is possible to have designers working on the markup while programmers author the C#
code.
C. Pages are easier to rename.
D. Managing files in a source control system is slightly easier.
A What of the followings is correct if we want to set the AChild form as a child form of the
parentform named TheParent?
A. [Link]= TheParent
B. TheParentMdiChild = AChild;
C. [Link] = TheParent
D. TheParentAChild = true:
E. [Link] = true
D The DataTable structure is defined by its _____ and____
A. Primary keys. Foreign keys
B. Columns. Rows
C. Rows. Constraints
D. Columns. Constraints
B Which property of TextBox control to set whether the TextBox control modifies the case
of characters as they are typed?
A. CharacterUpper
B. CharacterCasing
C. CharacterLower
D. PasswordChar
A One of the differences between an abstract class and an interface is?
A. An abstract class can inherit another abstract class; an interface cannot inherit another
interface.
B. An abstract class can be created its instance by using new keyword: an interface cannot.
C. An abstract class can define its own data: an interface cannot.
D. There are not differences between an abstract class and an interface.
D Methods, fields, constructors, ___ are called:
A. Delegates
B. Types
C. Members
D. Attributes
A How to change the transparent level of a Windows Form?
A. Use the Opacity property
B. Use the BackColor property
C. Use the ForeColor property
D. Use the Transparent property
A What is the lifespan for items stored in ViewState?
A. Exists for the Life of the current page
B. 2 seconds
C. 2 minutes
D. 20 minutes
A The ____ control is used when a field must not be left blank.
A. RequiredFieldValidator
B. RangeValidator
C. CustomValidator
D. RegularExpressionValidator
B Which element that may be contained within a MenujStrip?
A. ToolStripButton
B. ToolStripTextBox
C. ToolStripLabel
D. ToolStripProgressBar
D Which validation control is used to validate that the value of an input control is equal to a
fixed constant?
A. RangeValidator
B. CustomValidator
C. RequiredFieldValidator
D. CompareValidator
B What can be parameter modifiers of a given method?
A. public and private.
B. out ref and params.
C. params only.
D. out and ref only.
A Where do we can change default namespace of a project?
A. The project's Property window.
B. The Solution Explorer utility.
C. The Object Browser utility.
D. The Code Definition window.
B What is CTS?
A. CTS is a set of rulejHEBSSlt0 ensure that products of compilers will work properly in .NET
environment.
B. CTS is a formal specification that documents how types must be defined in order to be hosted
by the CLR.
C. CTS is physically represented by [Link] library.
D. CTS is a language that sits above any particular platform-specific instruction set.
B the property of the Radio Button control restricts the users to select only one option from
a give set of options
A. Radio Name
B. Group Name
C. Button Name
D. Panel Name
C what is purpose of code behind?
A, to ignore HTML usage
B, to merge HTML layout and code into one file
C, to separate HTML layout and code different file
D, to separate different sections of a page into different file
C who can access to sections state variables?
A, all users within a single tunnel
B, all users of an application
C, a single session
B the...directive is used to set the caching duration of the output for a page
A, @output
B, @cache output
C, @output cache
D, @cache duration
C what is default session time out?
A, 20 second
B, 1 hour
C, 20 minute
B select the control which dose not have any visible interface
A, data grid
B, repeater
C, drop down list
D, data list
D what data types do a range validator supports?
A, integer
B, string
C, data
D, all of above
C what is default authentication mode for us?
A, windows
B, none
C, anonymous
D, basic authentication
B what is authentication?
A, ensure code can only perform legal operation
B, the process of accepting credential, from a user and validating those a credentials against a
designated authority
C, the process of determining whether the proven identity is allowed access to a specific resource
D, [Link] to control access to resources by an assembly
C the directive is used to consume a created custom control
A, import
B, tag prefix
C, register
D, control
A select the type processing model that [Link] simulate?
A, event-driven
B, top down
C, linear
D, static
B what is default mode of [Link] authentication
A, windows
B, forms
C, none
D, passport
B which of the following is not a member of server object?
A, HTML decode
B, open
C, execute
D, transfer
D what is the size of the session ID
A, 32 bit long integer
B, 32 bit long character
C, 32 bit long double
D, 32 bit long string
C which of following field is not valid state management tool?
A, query state
B, hidden form field
C, cookies
D, application state
B what is the [Link] name does?
A, none
B, gets the server's machine name
C, gets the preferred website name one the server
D, get the client's machine name
B what is at the heart of Ajax programming?
A, dom
B, XML Http request object
C, cascading style sheets
D, JSON
C the first event to be triggered in an .ASPX page is:
A, [Link]
B, [Link]
C, [Link]
D, render
C when an .ASPX page is request from the web server, the output will be rendered to
Brower in following format:
A, XML
B, XAML
C, HTML
D, WML
B the number of forms that can be add to an ASPX page is:
A, more than 3
B, 1
C, 3
D, 2
C which of following is not member of response object?
A, clear
B, write
C, execute
D, flush
B when the user control's code is executed?
A, after the pager - Init event of web form
B, after the web form loads
C, before the page-Init event of web form
CD a WCF massage contains (chose 2 answer)
A, address
B, binding
C, contract
D, service
B which is the following sentence is true
A, Is postback is a method of [Link] class
B, Is postback is a method of [Link] class
C, Is postback is read only property of [Link] class
A What is the base keyword?
[A] The base keyword is used to access members of a base class from within a derived class.
[B] The base keyword is used as an operator or as a modifier.
[C] The base keyword is used in the definition of a method to support polymorphism.
[D] The base keyword is used to modify a method.
A Where can you change 'Default Namespace" of Visual Studio?
A. The Application tab of the project's Properties window.
B. The Debug tab of the project's Properties window.
C. The Build tab of the project's Properties window.
D. The Resources tab of the project's Properties window.
C The library provides shelter from the complexities of raw API calls and offers a
consistent object model used by all .NET-aware languages.
A. Shared class
B. Root class
C. Base class
D. Common class
A C# language offers the following features (choose a correct answer):
A. SqIDataAdapter
B. OleDataAdapter
C. ODBCDataAdapter
D. OleDbDataAdapter
B Which of the statements on Serializable is true?
A. The TrackBar control allows user to select to choose an item from a range of possible
selections, using a pair of small up and down arrows
B. The TrackBar control allows user to select a value from a range (of values), using scroll bar-
like input mechanism.
C. The TrackBar control allows user to input a string value.
D. The TrackBar control allows user to select a range of dates using a friendly Ul
B Assume you wish show data of Customers table in a DataGridView control. What is the
best manner to do it?
[A] Use the Connected Layer
[B] Use the Disconnected Layer
C What is NOT a client-site technology?
A. DHTML
B. JavaScript
C. [Link]
D. HTML
B What does the "EnableViewState" property do?
[A] ViewState is used to save your identity.
[B] It allows the page to save the users input on a form across postbacks.
[C] ViewState is used to ensure the security.
[D] ViewState is used to increase the performance.
B What is managed code?
[A] It is the code that cannot be directly hosted by the .NET runtime.
[B] It is the code targeting the .NET runtime.
[C] It is used to build the Component Object Model (COM).
[D] It is written by Visual Basic 6.0.
B Which thing is not included in a .NET PE file?
[A] IL
[B] Source code
[C] Resource file
[D] Metadata
B ______are the collection of reusable classes or types
[A] Collections
[B] Class libraries
[C] Namespaces
C What is the name of entity that compiles CIL code into meaningful CPU instructions?
[A] Common Language Specification (CLS).
[B] Common Type System (CTS).
[C] Just-in-time (JIT) compiler.
[D] C# compiler.
B Under which of the following environments does your programs execution code run?
[A] CLS
[B] CLR
[C] [Link]
[D] MSIL
C Which parameter modifier marks a parameter as passed by value?
A. ref
B. params
C. None
D. Out
AB How do we implement encapsulation? (choose 2)
A. Define a pair of accessor and mulator methods.
B. Define a named property
C. Define a destructor
D. Define a contructor.
AB What is described in "Win32 process " term? (choose 2)
a. Set of resource, such as external code libraries and the primary thread
b. Necessary memory allocations used by a running application
c. Number of required threads to run the process
d. Necessary CPU's time slot used by a running application
AB Why do we use Thread pool? (choose 2)
a. When using Thread pool, we can focus on our business problem rather than the application's
threading infrastructure.
b. The Thread pool manages thread efficiently by minimizing the number of threads that must be
created, started and stopped
c. Because the Thread pool are always thread with default priority
d. Because the Thread pool are always background threads.
A What is the first event is raised when the form has been allocated on the managed heap?
a. Load
b. Deactivate
c. Click
d. Activate
D Which event of form handles pressing a key?
a. KeyUp
b. Activated
c. Deactivate
d. KeyDown
B how do we create a control to enter password?
a. Use ComboBox control
b. Use TextBox control with PasswordChar property is set a value
c. Use TextBox control with default properties
d. Use PasswordBox control
B What are states that a CheckBox can have?
a. Checked only
b. Checked, Indeterminate and Unchecked
c. Unchecked only
d. Checked and Unchecked
BD What is spin control?(choose 2)
a. ComboBox
b. DomainUpDown
c. ListBox
d. NumericUpDown
B What is SoapFormatter?
a. SoapFormatter is not a serialization formatter
b. SoapFormatter is a serialization formatter that represents graph as a SOAP message
c. SoapFormatter serialization object graph to a stream using a compact binary format
d. SoapFormatter persists an object graph as an XML document
A What is a third-party data provider?
A. MySQL
B. OLEDB
C. Microsoft SQL Server
D. Oracle
E. ODBC
D Which class is used to insert, remove, evaluate and manipulate the values in a table of
one DataSet?
A. DataColumn
B. DataRow
C. DataView
D. DataTable
C Which information is included in a connection string?
A. Name of machine and name of the database on that machine only.
B. Name of the database on that machine and required security settings only.
C. Name of machine, name of the database on that machine, required security settings and other
data provider-specific information.
D. Name of machine only.
D What is result of the following SQL command?
Select [Link], [Link], [Link], [Link]
From Students Inner Join Classes On [Link] = [Link]
(Assume that all table names and columns are correct)
A. Return all rows with all columns of Students table.
B. Return records that have StudentNo, LastName, FirstName from Students table only.
C. Return records that have ClassName from Classes table only.
D. Return records that have StudentNo, LastName, FirstName from Students table and
ClassName from Classes table.
C In below events of page, which one is raised first?
[A] PreRender
[B] Load
[C] Prelnit
[D] Unload
AD What is method of form to transmit the form data back to web server for processing?
(Choose 2)
[A] Get
[B] Postback
[C] Receive
[D] Post
B What are building blocks of an XML Web service?
[A] A discovery service and a transport protocol.
[B] A discovery service, a description service and a transport protocol.
[C] A description service and a transport protocol.
[D] A discovery service and a description service.
A _____is any action directed at the application.
[A] Event
[B] Method
[C] Class
[D] Object
CD Which of the following statement with respect to Data Grid control are True? (Choose all
correct answers)
[A] By default, the DataGrid display 1 page at a time.
[B] When the DataGrid control is set to a valid data source, the control is populated
automatically
[C] Each field in the DataGrid is bound to a single column based on the DataSource
[D] The DataGrid control display data in tabular format and optionally supports data editing.
D The method can be used to draw a rectangle or a square depending on the coordinates
passed as its argument.
[A] FillSquare
[B] FillRectangle
[C] DrawSquare
[D]DrawRectangle
A _____it the normal ouput type for a WinForm project
[A] Windows Application
[B] Console Application
[C] Class Library
[D] Windows Forms
D The ____control groups a set of controls within a non-labeled an scrollable frame
[A] PictureBox
[B] Tab
[C] Frame
[D] Panel
D The ____feature of Windows Installer provider a standard method for distributing
components and ensures that the installed component is of the correct version.
[A] VersionUpdate
[B] CAB
[C] Msi
[D] Merge Modules
E To create an instance of the Font class using existing Font and FontStyle, the constructor
is:
[A] public void Font(string fontname, float size);
[B] public Font(FontStylefs, Font f);
[C] public void Font(Font f, FontStylefs);
[D] public Font(Font f, FontStylefs);
[E] public Font(string fontname, float size);
A Which namespace is [Link] contains classes that help in constructing and sending
emails?
[A] [Link]
[B] [Link]
[C] [Link]
[D] [Link]
D ____property of a connection object is used to get or set the string used to open a
database
[A] ConnectionParams
[B] ConnectionInfo
[C] StringConnection
[D]ConnectionString
A ____property is used to get or set the shortcut menu associated with the control.
[A]PopUpMenu
[B] SubMenu
[C] ContextMenu
[D] MainMenu
D To get values of the columns of the i-th row in a DataTable object named datatable, what
of the follwings is correct?
[A] DataColumn array = [Link][i].ItemArray;
[B] String[]array = [Link][i].ItemArray;
[C] Object[]array = [Link][i].ItemArray;
[D]DataRow array = [Link][i].ItemArray;
D The____ event of the PrintDocument class is triggered immediately before each
PrintPage event ocurs.
[A] StartPrint
[B] BeginPrint
[C] PrintPage
[D] QueryPageSettings
D Which namespace does the class ListView belong to?
[A] [Link]
[B] [Link]
[C] [Link]
[D][Link]
D The Pen class belongs to the ____namespace and cannot be inherited
[A] [Link]
[B] [Link]
[C] [Link]
[D][Link]
C Which class represents shortcut menus that can be displayed when the user clicks the
right mouse button over a control or area of the form?
[A] ToolMenu
[B] MainMenu
[C]ContextMenu
[D] FileMenu
F Arrange the sequence in which the key events are triggered
[A] KeyPress, KeyUp, KeyDown
[B] KeyUp, KeyPress, KeyDown
[C] KeyDown, keyPress, KeyUp
[D] KeyPress, keyDown, KeyUp
[E] KeyUp, KeyDown, KeyPress
[F] KeyDown, KeyUp, KeyPress
C What are thee steps involved involved in calling one from another form?(choose all
answers)
[A] Create an instance of the calling form
[B] Create an instance of the form to be called
[C] Invoke Show
C The ____property of the Form control is used to determine whether there are any MDI
child forms open in your MDI application.
[A] ActiveMdiChildren
[B] ActiveMdiChild
[C] IsMdiChild
[D] IsMdiChildren
D A custom control should you use to verify an authorized aplication user called as _____
[A] Composite Custom Control
[B] Standard Control
[C] Single Control
[D] Complex Control
A which class is the base class for all the controls that can be used in Windows Forms?
[A]Control
[B] Controls
[C] Forms
[D] Objects
D The ____ property of the LinkLabel control is used to specity the text, which has to be
displayed as a link.
[A] HyperLink
[B] URLName
[C] LinkName
[D] LinkArea
D GDI + resides in _____ assembly.
[A] [Link]
[B] System
[C] [Link]
[D][Link]
C What of the following are correct for creating a connection object to database named
MyDB? (Choose all correct answers)
[A] SqlConnection con = new SqlConnection("server=myserver;
Integrated Security = SSPI; database=MyDB");
[B] SqlConnection con = new SqlConnection("server=myserver"
Intergrated Security=SSPI; Data Source=MyDB);
[C]SqlConnection con = new SqlConnection("Data Source=myserver;
Integrated Sercurity=SSPI; Initial Catalog=MyDB");
D The view types supported in Winforms are (choose all correct answers)
[A] Text with large icons
[B] Text only
[C] Text with small icons
[D] Report view
D In WInforms , specify method used to specidy the next control to be navigated according
to the tab order
A. SetNextTab
[Link]
[Link]
[Link]
C What tags do you need to add within the asp:datagrid tags to bind columns manually?
[A] Inside tag in asp:Datagrid we set Text attribute to <%# [Link] ([Link]
"Col_Name") %>
[B] Inside tag in asp:Datagrid we set Text attribute to <%# [Link](~Col_Name~
[Link]) %>
[C] Inside tag in asp:Datagrid we set Text attribute to <%# [Link]([Link]
"Col_Name") %>
[D] Inside tag in asp:Datagrid we set Text attribute to <%# [Link](~Col_Name~
[Link]) %>
AB Choose 2 correct statements about the ViewState and SessionState
A. ViewState persist the values of controls of controls of particular page in the client(Browser)
when post back operation done. WHen request another page previous page
B. SessionState persist the values of controls of controls of particular page in the client(Browser)
when post back operation done. WHen user request another page previous
C . SessionState persist the data of particular user in the server .This data available till user close
the browser or session time completes
D . View State persist the data of particular user in the server . This data available till user close
the browser or session time completes
C To perform a change to a table using the Command object named Cmd, what statement of
the following is correct?
[A] [Link]()
[B] [Link]()
[C] [Link]()
[D] [Link]()
[E] [Link]()
D What is not a component of [Link] AJAX Server Framework?
[A] Microsoft AJAX Library
[B] Web Services bridge
[C] [Link] 2.0 Ajax Server Extensions
[D] Ajax-enabled [Link] Pages
D The two built-in channels available in .NET Framework are ... and ...
[A] XML, SOAP
[B] Client, Server
[C] NetBIOS, SPX
[D] TCP, HTTP
C A Delegate object
A . is mutable
B . Is an instance of a class
C . Is created with the new operator
D. is static object
C How can we add a row is in a Data Table object ?
[A] We can use the NewRow method of DataTable class
[B] We can use the Insert method of DataTable class
[C] We can use the Add method of DataTable
C Which of the following statements with respect to [Link] are True? (Choose all correct
answers)
[A] When we use the DataSet object [Link] is based on disconnected data access.
[B] [Link] objects are all strongly typed.
[C] Systems built on [Link] are intrinsically highly scalable.
[D] In [Link], the RecordSet is bound to the data source
B Where is a protected class-level variable available?
[A] It is available only in this class.
[B] It is available to any sub-class derived from base class.
[C] It is available to any classes in the same assembly.
[D] It is available to all other classes.
B What is the correct way of creating a DataTable in a DataSet?
[A] D ataTab 1 e dtO rd e rs;
[B] DataTable dtOrders = new DataTable("Orders");
[C] DataTable dtOrders = DataTable("Orders");
[D] ds.T [Link]("Orders");
A What does the following SQL statement return, assuming that all tables and column
names are correct?
SELECT FirstName, StreetAddress FROM Employees JOIN AddressBook
ON [Link] = [Link]
using System;
class Program
{
delegate void Display();
static void Main()
{
Display d1 = new Display(DisplayHello);
d1();
}
static void DisplayHello()
{
[Link]("Hello");
}
}
A. Hello
B. Compile error at line: delegate void Display();
C. Compile error at line: d1();
D. Runtime error
D An assembly consists of Assembly Metadata, Type Metadata, ... and ...
A. ButtonValue
B. ResultDialog
C. ButonResult
D. DialogResult
E. ReturnValue
B What does [Link] will do?
A. It will stop the client process
B. It will stop the server process
A Which sentence about Application variables is correct?
A. 1
B. 2
C. 3
D. 4
A We can use... and ... methods to ensure that application-level variables are not updated by
more than one user simultaneously.
A. Delegates
B. All of the others
C. Methods, Classes, Interfaces
D. Structures
A MessageBox is a type of dialog box
A. TRUE
B. FALSE
A Which event is raised when user choose an item in ComboBox control?
A. SelectedIndexChanged
B. Click
C. Validated
D. DropDown
D See picture:
A. The code will not compile successfully because myClass is a readonly variable, which also
means it is static. You can
B. The code will not compile successfully because myClass is a readonly variable and you
cannot change value of a read
C. The code will not compile successfully because a readonly class instance cannot access its
internal data.
D. The code will execute and print out: 100
F ______is used to display text or data in the form of nodes arranged in a hierarchical
order?
A. NodeView
B. ItemView
C. TaskView
D. FormView
E. ListView
F. TreeView
C "public", "private", "protected", "internal", "protected internal" keywords are called:
A. Modifiers
B. Delegates
C. Access modifiers
D. Types
D Which method of Command object can be used to update an existing record in one table
of database?
A. ExecuteReader
B. ExecuteScalar
C. ExecuteXmlReader
D. ExecuteNonQuery
D It is important to understand that the value assigned to a constant variable must be known
at_______
A. Debug-time
B. Run-time
C. None of the others
D. Compile time
D What is state of a thread after creating a Thread object and call the [Link]()
method?
A. Stopped
B. Started
C. Unstarted
D. Running
D Which sentence is correct?
A. A class can inherit from many abstract classes.
B. An abstract class is a class that cannot be inherited from.
C. An abstract class is a class that can be sealed.
D. An abstract class is a class that cannot be instantiated.
D Determine the output of the following code segment:
int x = 2009;
decimal y = 2m;
int z = x/y;
[Link] ("The value of x / y is : {0}", z);
A. 1004.5
B. 1005
Cc. 1004
D. Compile error!
A Which sentence about foreground threads is correct?
A. Foreground threads have the ability to prevent the current application from terminating.
B. You can set a thread is foreground thread by using IsForeground property.
C. You cannot create any foreground threads.
D. Foreground threads are viewed by the CLR as expendable paths of execution that can be
ignored at any point in time.
D Which sentence about DataReader object is correct?
A. Request-Response
B. Linear
C. Static
D. Event-driven
C Which sentence about shared assemblies is correct?
A. Constructor
B. Events
C. Methods
D. Properties
c Which sentence is correct?
A static method is called on the object.
B. Static data describes information for individual objects.
C. Static data describes information for all objects of a class.
D. Object data describes information for all objects of a class.
C How many parts of a .Net assembly version?
A. 1
B. 2
C. 4
D. 3
D interface Class1
{
public void SayHello(string yourName);
}
class Class2 : Class1
{
public override void SayHello(string yourName)
{
[Link]("Hello {0}", yourName);
}
}
class Program
{
static void Main(string[] args)
{
Class2 obj = new Class2();
[Link]("Visual C#");
}
}
A. Hello
B. Hello {0}
C. Visual C#
D. HelloVisual C#
B Which method of the Control class conceals the control from the user?
A. Hide
B. Visible
C. Dispose
D. Close
C Which sentence about MDI application is correct?
A. Ina MDI application, if the user maximizes a particular child window, you have to merge the
child's menu system with the parent.
B. MDI applications do not allow user to have multiple child windows open at the same time
within the same topmost window.
C. MDI applications allow you to "merge menus''.
C Which sentence about working with directories is correct?
A. You cannot use the Directorylnfo class for operations such as copying, moving, renaming,
creating and deleting directories.
B. All methods of DirectorylInfo class are static.
C. All methods of Directory class are static.
D. You cannot use the Directory class for operations such as copying, moving, renaming,
creating and deleting directories.
D Validity of a page can be checked using the ... property.
A. ValidateControl
B. ControlToValidate
C. IsValidControl
D. IsValid
A Unboxing is
A. Explicit conversion
B. Implicit conversion
A Assume that you create a Web service by Visual C# language. Can you consume this
Web service by a client that is written in Java language?
A. No
B. Yes
D When do we use virtual keyword?
A. When we want to define a constructor.
B. When we want to define an override method.
C. When we want to define an overridden base method.
D. When we want to define a destructor.
B Which event handler is fired when a new user logs on to your application?
A. Application_Start()
B. Session_Start()
C. Application_End()
D. Session_End()
C What is utility allows you to view the set of all content files and referenced assemblies?
A. Class View.
B. Code Definition Window.
C. Solution Explorer.
D. Object Browser.
A A command builder is only able to autogenerate SQL commands for use by a data
adapter, if
A. The Select command interacts with only a single table, the single table has been attributed
with a primary key, and the column(s) representing the primary key is accounted for in you
B. The Select command interacts with only a single table.
C. .NET does not support to autogenerate SQL commands.
D. The Select command interacts with only a single table and the single table has been attributed
with a primary key.
A We CANNOT use methods that have some arguments for a delegate?
A. No
B. Yes, but methods have to only one argument.
C. Yes
A What is output of the following code?
using System;
class Program
{
delegate void Display();
static void Main()
{
Display d1 = new Display(DisplayHello);
d1():
}
void DisplayHello()
{
[Link]("Hello");
}
}
A. Compile error at line: Display d1 = new Display(DisplayHello);
B. Compile error at line: d1();
C. Hello
A What is utility shows all of the types in your current project from an object-oriented
perspective?
A. Object Browser.
B. Code Definition Window.
C. Solution Explorer.
D. Class View.
D Which of following extension does a Web service file will have?
A. ascx
B. aspx
C. resx
D. asmx
D Boxing is
A. Convert a numeric value to object
B. Convert an object to a value type
C. Convert a string to a numeric value
D. Convert a value type to a object
C Which object provides the ability to connect to and disconnect from the data store?
A. Command
B. DataAdapter
C. Connection
D. DataReader
B You have a code library that was written by C#. Can you use this library with [Link]?
A. No
B. Yes
C What is term for conversion from a value type to an object?
A. Explicit conversion.
B. Implicit conversion.
C. Boxing
D. Unboxing.
B Which sentences are correct?
A. A form is only used to receive information from the user.
B. A form is a class.
C. A form is only used to present information to the user.
D. A form is not a control.
B Which sentence about web services is correct?
A. Web services can be written in C# only.
B. Web services allow invoking methods and properties of a remote object using standard HTTP
request.
C. Web services can be run on Windows systems only.
D. Programs that are written in Java cannot use the web service which is created by a .NET
language.
A class Animal
{
public void Display()
{
[Link]("animal");
}
}
class Mammal : Animal
{
public new void Display()
{
[Link]();
[Link]("Mammal");
}
}
static void Main(string[] args)
{
A. Compile error
B. 1
C.0
D. -1
C By setting the Text property on the form, you will cause the value of the Text property to
display on which part of the form?
A. Status bar
B. Top-right corner
C. Title bar
D. Bottom-right corner
C How many interfaces a class can implement?
A. A class cannot implement any interfaces.
B. Only one.
C. Many.
D Which of the following associations of try, catch and finally is INVALID?
A. try {} catch {} finally {}
B. try {} finally {}
C. try {} catch
D. catch {} finally {}
B DataSet object is one of the components of the data provider,
A. TRUE
B. FALSE
D What is output of the following code?
static void Main(string]) args)
{
[Link] newArray = new [Link]();
[Link]("August");
[Link](2010);
foreach (object oneltem in newArray)
[Link]([Link](). ToString());
}
A. Compile error
B. Runtime error
C. August
2010
D. [Link]
System .Int32
C What is different between namespaces and assemblies?
A. A namespace can contain many classes, but an assembly can include only one class.
B. A namespace can contain only one class, but many classes can reside in an assembly.
C. Namespaces are logic entities, but assemblies are physical mechanism.
D. Namespaces are physical mechanism, but assemblies are logic entities.
a Choose the correct statement
1) The Deactivate event occurs when the user switches away from the from and concentrates on
other form
2) The FormClosing event arises when the form is in its hiding state
3) The FormClosed event arises when the form is closing
A. Statement 1 is correct
B. Statement 2 is correct
C. Statement 3 is correct
Neat
D. All statements are correct
D Which control is used to display text only?
A. TextBox
B. RadioButton
C. CheckBox
D. Label
B Which sentence about Cookie is correct?
A. Cookie is used to maintain sensitive information about the current user.
B. Cookie is often realized as a text file on the user's machine.
C. The exact location of cookie files does not dependent on which browser is using.
D. Cookie is often realized as a text file on the web server.
B Look at the following statements:
(A) A given class (or structure) may define only a single static constructor
(B) A static constructor executes exactly one time, regardless of how many objects of the type
are
Created
(C) A given class (or structure) may define many static constructors
A. Compile error!
B. 2009
C. 2010
D. 2008
D What is output of the following code?
class Program
{
delegate double Unary(double n1);
static double Power(double n1, double power)
{
return ([Link](n1, power));
}
static void Main(string[] args)
{
Nest Unary ul = new Unary(Power); [Link](u1(9,3).ToString());
}
}
A. 9
B. 729
C. 3
D. Compile error
D In [Link] application,________ and___________ variables can be accessed by all the
pages in the application.
A. Application, Request
B. Global, Session
C. Server, Response
D. Session, Application
C ... enables the possibility for a function to be polymorphic when it is overridden in one or
more inherited classes.
A. static
B. parameterized
C. virtual
D. overridden
A Interface references CANNOT be obtained through:
A. Explicit cast
B. The is keyword
C. The as keyword
B .NET Framework has two main components, are
A. Common Language Runtime and [Link]
B. Common Language Runtime and .NET Framework class library
C. .NET Framework class library and [Link]
D. Common Language Runtime and Windows Forms Application
C Which type in C# is a kind of value-based types?
A. Class
B. Interface
C. Enumeration
D. Delegate
A Can a namespace be resided into many assemblies?
A. Yes
B. No
a A web service which conforms to WSI basic profile 1.1 can include some methods that
have the same name.
A. No
B. Yes
B Which sentence about thread pool is correct?
A. Default priority of a thread in thread pool is BelowNormal.
B. The thread pool manages threads efficiently by minimizing the number of threads that must be
created, started, and stopped.
C. You can set priority for a thread in thread pool.
D. Threads in thread pool are always foreground threads.
A Which of the following classes can be used to read/write textual information from/to a
block in memory?
A. StreamReader/StreamWriter
B. StringReader/StringWriter
C. File
D. BinaryReader/BinaryWriter
D Assume you wish to build a Web page to show list of products in database. at is the most
suitable met for this task?
A. Use XML
B. Use Client-Side scripting
C. Use HTML
D. Use Server-Side scripting
B Which sentence about code library is correct?
A. A code library must take a *.dll extension.
B. A code library can be an executable file.
C. You cannot create a code library in C#.
D. You cannot reuse the library which is written by C# in any other .NET programming
language.
C Responsibilities of CLR are compiling source codes into an assembly and loading the
type into memory.
A. Yes.
B. No, responsibilities of CLR are loading the type into memory and compiling CIL into
platform-specific instruction.
C. No, responsibilities of CLR are compiling source codes into an assembly and resolving the
location of an assembly.
D. No, responsibilities of CLR are compiling source codes into an assembly and executing the
code.
C Can we check whether an .aspx page is posted back to the server?
A. Yes, by using IsPostForward property of Page class.
B. No
C. Yes, by using IsPostBack property of Page [Link]
B Which element of a .NET assembly defines numerous flags that enable the runtime to
understand the layout of the managed file?
A. CIL code
B. A CLR file header
C. A Win32 file header
D. Type metadata
B Can we create a custom Windows Forms control in C#?
A. No
B. Yes
C What is state of a thread after creating a Thread object?
A. Started
B. Stopped
C. Unstarted
D. Running
A Which type of the System. Threading namespace can be used to resolve the issue of
concurrency?
A. ThreadPool
B. Timer
C. Monitor
D. Thread
C Determine the output of the following code segment:
int x = 2009;
int y = 2010;
[Link] ("The value of x | y is : {0}", (x | y));
A. 2010
B. 2009
C. 2011
D. Compile error!
A Which event we can place code in which to initialize variables once during session start?
A. Session_Start
B. Application_Start
C. Session_End
D. Application_End
C What is output of the following code?
using System;
class Program
{
static void Main()
{
Display<System .Int32>();
}
static void Display<T>()
{
[Link](typeof(T).ToString());
}
}
A. Compile error
B. Runtime error
C. System.Int32
D. ToString()
C 24, custom control created using C# need to be saved using the extension
A, ASMX
B, CS
C, ASCX
D, ASPX
C 32, how do you register a user control
A, add tag prefix tag name
B, add source, tag prefix
C, add Src, tag prefix tag name
C Which building block is a formal specification that describes how types must be defined
in order to be hosted by CLR?
A. CLR
B. The base class library
C. CTS.
D. CLS
C What is default value of AutoPostBack property?
A. True
B. 1
C. false
D. 0
C What is a "type" in the world of NET? (Choose the most correct answer)
A. Type is a generic term used to refer to a member from the set {class, structure, interface}.
B. Type is a generic term used to refer to a member from the set {class, structure}.
C. Type is a generic term used to refer to a member from the set {class, structure, interface,
enumeration, delegation}.
D. Type is a. generic term used to refer to a member from the set {class, structure, interface,
enumeration}.
A Which property of form to get or set the button control that will be clicked when the user
presses the Esc key?
A. CancelButton
B. EscButton
C. AbortButton
D. AcceptButton
D Given the following code segment, what will the value returned from the method be?
public int ViktorMove()
{
int x= 42;
int y =12;
int w;
object o;
o = x;w=y*(int)o;
return w;
}
A. 42
B. Runtime error, Null Pointer exceptionl
C. 491
D. 504
B What is output of this code?
DateTime dt = [Link]("10/10/2009"),
[Link]{[Link]{22).ToString("dd/MM/@yyy"):
A. 31/10/2009
B. 01/11/2009
C. Compile error
D. 11/1/2009
E 1/11/2009
F. 11/01/2009
B Which Windows Forms control can be used to get characters from keyboard?
A. Label
B. ComboBox
C. CheckBox
D. ListBox
A What is output of the following code?
using System,
using System Data;
using System [Link]:
class Program
{
static void Main0
{
SqlConnection cn = new SqlConnection(:
[Link]:
[Link](cn [Link]());
}
}
A. Runtime error
B. Open
C. Compile error
D. Closed
C Does "return 10 as long" compile?
A. No, because there is no as operator in C#
B. Yes
C. No, because long is not a reference type
D. No, because 10 cannot be cast to long
B What does the keyword ''virtual'' declare for a method?
A. The method cannot be accessible.
B. The method can be overridden
C. The method cannot be overridden
D. The method cannot be inherited.
A Which sentence about BufferedStream is correct?
A. BufferedStream provides temporary storage for a stream of byte that may be committed to
storage at a time.
B. BufferedStream is used to store textual information to a file.
C. BufferedStream provides random access to streamed data stored in memory rather than a
physical file.
D. BufferedStream allows for random file access with data represented as a stream of bytes.
B What are required services in an [Link] Web server?
A. World Wide Web Publishing and HTTP SSL
B. IIS Admin World Wide Web Publishing
C. Messenger and lIS Admin
D. HTTP SSL and Messenger
C Which sentence is NOT correct?
A. Explicit conversions are kind of type conversions.
B. Explicit conversions require a cast
C. Explicit conversions are guaranteed to success
D. With explicit conversions, information might be lost.
B What is reason for using client-side scripting?
A. To query data from database.
B. To validate user input before posting back to the web server
C. To implement codes required high security.
D. To upload a file to the web server.
C How many [Link] Files an ASP .NET application can have?
A. An ASP .NET application don't have [Link] file
B. Only 1
C. Greater than or equal 1.
A Which sentence about single-file assemblies is correct?
A. If an assembly is composed of a single module, you have a single-file assembly.
B. Single-file assemblies are *.dil only.
C. Single-file assemblies do not contain all the necessary CIL, metadata, and associated
manifesting an autonomous, single. well-defined package.
D. Single-file assemblies are *.exe only
c What are system exceptions?
A. System exceptions are custom exceptions that derive from the [Link] type.
B. System exceptions are errors when compiling project
C. System exceptions are exceptions that are throw by the CLR
B ____ are the visual effects supported in Windows Forms applications
A. Control Anchoring, Class Libraries, Transparent Forms
B. Transparent Forms, Control Docking, Control Anchoring
C. Class Libraries, Transparent Form, Control Docking
D. Control Docking, Control Anchoring, Class Libraries
B Does DataTable class support a method that allows obtaining the data reader-like
navigation scheme?
A. No
B. Yes
c Which method is fired lastly during the page load?
A Init()
B. Load()
C. Unload()
D. PreRender()
A Which sentence about properties is correct?
A. Properties can be static.
B. Properties have only set block.
C. Properties must have set and get block.
D. Properties have only get block.
A Which sentence is correct?
A. Override method and overridden base method have to have the same return type
B. Overridden base method cannot include an override modifier.
C. Override method and overridden base method don't have the same declared accessibility.
D. Override method is an instance method declaration includes a virtual modifier.
D Which event occurs when the form is closed?
A. Closed
B. Deleted
C. Destroyed
D. Disposed
C Which keyword is used when you wish to explicitly reference the fields and members of
the current object?
A. abstract
B. base
C. this
D. virtual
B Which one in the below events is fired secondly during the page load?
A. PreRender()
B. Init()
C. Unload()
D. Load()
B Which sentence about WSDL is correct?
A. WSDL is executed by the client.
B. WSDL is used to describe information about the web service.
C. WSDL is based on HTML.
D. WSDL is executed by the web server.
C Which property of TextBox control in Windows Forms application is used to create
password input box?
A. Multiline
B. ReadOnly
C. Password Char
D. Text
B What is name of software product that host web applications?
A. Web application
B. Web server
C. Exchange server
D. FTP server
C You are building a C# application. Your application has two assemblies: [Link] and
[Link].
Which of the following access modifiers will you use for all methods inside the assembly
[Link]?
A. private
B. public
C. internal
D. sealed
A How can we check that some changes have been made to a DataTable since it was
loaded?
A. We can use the method HasChanges() to check whether a datatable is changed or not
B. We can use the method HasNewRows to check whether a datatable is changed or not
C. We can use the property lsChanged to check whether a datatable is changed or not
A What is return value of ExecuteNonQuery() method of a Command object?
A. An integer is number of affected row
B. The Command object does not support ExecuteNonQuery() method.
C. The ExecuteNonQuery() does not have a return value.
D. An integer represents total rows that are results of SGL command.
D What is the output format of the file the C# compiler produces?
A. Byte code
B. Hex dump
C. Native Machine Code
D. IL
D In Visual Studio .NET 2008, _____ utility presents a logical view of our work using an
Explorer-like view of the classes, methods and properties.
A. Properties View
B. Solution View
C. Resource View
D. Class View
D Which class is at the top of .NET class hierarchy?
A. System.Int32
B. [Link]
C. [Link]
D. [Link]
b You need to get access to a Microsoft Excel 2003 file. Which data adapter would you
use?
A. ODBCDataAdapter
B OleDbDataAdapter
C. SqlDataAdapter
D. OleDataAdapter
B Does Microsoft supply data provider for Oracle database?
A. No
B. Yes
C What is NOT a type in the world of NET?
A. Interface
B. Struct
C. Variable
D. Class
C What is output of the following code?
(see picture)
A. 0
B. Compile error
C. 3
D. Runtime error
A A C# class can be inherited from multiple interfaces?
A. Yes
B. No
C What of the followings is correct for creating a command object with the connection con?
A. SqlCommand Cmd = new SqlCommand(con,"Select * From Student");
B. SqlCommand Cmd = [Link]("Select * From Student");
C. SqlCommand Cmd = new SqlCommand("Select * From Student",con);
D. SqlCommand Cmd = [Link]("Select * From Student");
A Complete this sentence: At the heart of events are______
A. Delegates
B. Buttons
C. Methods
D. Threads
A What is WSDL?
A. Is used to describe information about the web service.
B. Is executed by web server.
C. Is based on HTML.
D. Is executed by client
B Which control allows selecting more than one item?
A ComboBox
B. ListBox
C. DateTimePicker
D. TextBox
A Which variables can use only by one user but in all pages?
A Session
B. Application
C. ViewState
D. Cookie
B By default can we delete a folder that contains subdirectories and files?
A. Yes
[Link]
D What is output of the following code?
using System;
class Program
{
static void Main()
{
Display<System.lnt32>(2010);
}
static void Display<T>(T v1)
{
[Link]([Link]());
}
}
A Compile error
B. Runtime error
C. v1
D. 2010
A Which sentence about value types is correct?
A Value types must derive from [Link].
B. Value types can override [Link]() method.
C. Variables of a value type are passed by reference by default
D. Value types are allocated on the managed heap.
D Suppose we have multi-file assembly as follows: [Link]. parti netmodule.
[Link]. [Link].
Which file is the manifest information located in?
A In [Link]
B. Each file contains a piece of manifest information
C. In parti .netmodule
D. In [Link]
A [Link]();
studentCommand = [Link]();
[Link] = [Link];
[Link] = "SELECT * FROM Student"; studentAdapter = new
SqlDataAdapter (studentCommand); studentSet = new DataSet();
[Link] Add ("Text". studentSet "FirstName");
A The dataset has not been populated.
B. The data binding is done incorrectly.
C. The dataset object is instantiated incorrectly.
D. The command object is instantiated incorrectly.
D An object that supports the______. interface stores state information for an asynchronous
operation, and provides a synchronization object to allow threads to be signaled when the
operation completes.
[Link]
B. Delegate
C. AsyncCallback
D. IAsyncResult
B The ___ method of the ____ object is used to retrieve the data in the form fields
submitted by the user.
A [Link]. Request object
B. [Link] Request object
C. [Link]. Response object
D. [Link] Response object
b We have to following sentences:
1) VBScript is client-side script code which is supported by all browsers.
2) JavaScript is client-side script code which is supported by Internet Explorer only.
A. Sentence 1 is correct sentence 2 is correct
B. Sentence 1 is not correct sentence 2 is not correct
C. Sentence 1 is correct sentence 2 is not correct
D. Sentence 1 is not correct sentence 2 is correct
C In Windows Form.______is a Command type control.
A Text
B. Label
C. LinkLabel
D. TextBox
B What output of the follwing code?
static class Program
{
static void Main()
{
int n1= 1;
object o1 =n1;
string s1= (string)o1;
[Link](s1);
}
}
A.1
[Link] is an exception when running
[Link] are some errors when compiling
[Link]
A What is output of the following code?
using System;
using [Link];
class Program
{
static void Main() {
SqICommand cmd = new SqICommand();
[Link]([Link]);
}
}
A. There is no output
B. Runtime error
C. CommandText
D. Compile error
C which the following sentence about Delegate is true?
A. Delegates cannot be used to define callback methods.
B. A delegate object can maintain a single method only.
C. A delegate object can maintain a list of methods to call.
D. Delegates do not allow methods to be passed as parameters
D Why the data is not inserted using the following code?
A. BinaryFormatter
B. SoapFormatter
C. NetworkFormatter
D. Formatter
B What is output of this code? static void Main() {
int number1 = 3;
int number2 = 2;
float number3 = number1 / number2; [Link]([Link]());
}
A 1.5
B. 1
C. compile error
C What are NOT Web Server controls?
A. [Link] controls.
B. HTML controls
C. HTML with value of runat property is server.
B What is output of the following code?
string cnnString = @"Data Source=localhost\SQLExpress;lnitial Catalog=Northwind;lntegrated
Security=True";
[Link] dt = new [Link]("Products");
[Link] da = new
[Link]("Select* From Products". cnnString): [Link](dt);
[Link]([Link]());
(Assume that connection string and table name is correct)
A .Running error
[Link] row of product table
[Link] colum of product table
[Link] error
A What is output of this code?
string s1 = "Visual C# And .NET Technology";
string s2 = [Link](0. [Link]('#')); [Link]([Link]());
A. VISUAL C
B. Visual C
C. VISUAL C#
D. Compile error
A __ is an object in which the data retrieved from the database can be stored.
A. DataSet
B. SqICommand
C. Command
[Link]
A What kind of memory where an object is allocated?
A. Managed heap
B. Data area
C. Stack area
D. Code area
B To help optimize the garbage collection process, each object in the heap is assigned to a
specific generation. If an object is marked as Generation 0. it means:
A. That object is an allocated object and has survived through three garbage collection.
B. That object is a newly allocated object and has never been marked for collection.
C. That object is an allocated object and has survived through one garbage collection.
[Link] object is an allocated object and has survived through two garbage collection
B What is output when request the page that contains the code bellow? protected void
Page_Load(object sender. EventArgs e)
{
[Link]("<h1>Hello world!</h1 >"):
}
A. <h1>Hello world!</h1>
B. Hello world!
C. Compile error
D. [Link]("<h1>Hello world!</h1>")
D Which sentence about namespace is correct?
A. Classes from one namespaces cannot reside in many assemblies.
B. Namespaces are physical mechanism.
C. Namespaces are runtime entities.
D. Classes from many namespaces can reside in one assembly.
C Does C# support multi inheritance? (Choose the most correct answer)
A. Yes. but only for inheritance from many interfaces.
B. No
C. Yes
C What is output of this code?
class Class1
{
internal string field1;
}
class Program
{
static void Main(string[] args)
{
Class1 obj1 = new Class1();
obj1.field1 = "abcdef";
Class1 obj2 = obj1;
obj2.field1 = "defabc";
[Link](obj1.field1); [Link]();
}
}
[Link]
[Link]
[Link]
[Link] error
C In Windows Form application, which control is used to display text when the mouse
points to a particular control?
A. Status Strip
B. ToolStrip
C. ToolTip
D. MenuStrip
C SqIConnection conn = new SqIConnection(); [Link] =
CONNECTION_STRING;
SqICommand cmd = new SqICommand(); [Link] = conn:
[Link] = ''SELECT FROM tl; SELECT FROM t2; SELECT * FROM t3'';
SqlDataAdapter adapter = new SqlDataAdapter(); [Link] = cmd;
DataSet ds = new DataSet(); [Link](ds);
A. ParameterizedThreadStart
C. ThreadStart
D. Thread
A Can we connect to SQL Server Database without using SqIConnection?
A. SqIDataAdapter
B. OleDataAdapter
C. ODBCDataAdapter
D. OleDbDataAdapter
B Which of the statements on Serializable is true?
D. Being Serializable applies to all types that are stored on the stack, and only to them
B What is the TrackBar control?
A. The TrackBar control allows user to select to choose an item from a range of possible
selections, using a pair of small up and down arrows
B. The TrackBar control allows user to select a value from a range (of values), using scroll bar-
like input mechanism.
D. The TrackBar control allows user to select a range of dates using a friendly Ul
B Assume you wish show data of Customers table in a DataGridView control. What is the
best manner to do it?
[A]
Use the Connected Layer
[B]
Use the Disconnected Layer
C You want to add a control to your form that allows you to set a particular option on or
off. Which control would you choose?
[A]
Button
[B]
ListBox
[C]
CheckBox
[D]
CheckedListBox
C What is NOT a client-site technology?
A. DHTML
B. JavaScript
C. [Link]
D. HTML
A Which control is used to display a short, customized help message for individual controls
on a form?
[A] ToolTip
[B] HelpText
[C] HelpTool
[D] ToolClass
C Assume that a method named DataLoad is defined to makes a list of suppliers available
by returning an ICollection interface. A Web page has a ListBox control named
IbCustomers. The Page_Load event handler for the Web page contains this code:
private void Page_Load(object sender, [Link] e)
{
IbCustomers. DataSource = DataLoad();
IbCustomers. DataTextField = "CustomerName";
}
The Web page opens without error, but no customer names are displayed. What is the problem?
[A]
The code should be placed in the Page_lnit() event handler.
[B]
A ListBox control cannot be bound to an ICollection interface.
[C]
Miss calling the DataBind() method of the page.
[D]
Miss setting the DataValueField property of the ListBox control.
B What does the "EnableViewState" property do?
[A]
ViewState is used to save your identity.
[B]
It allows the page to save the users input on a form across postbacks.
[C]
ViewState is used to ensure the security.
[D]
ViewState is used to increase the performance.
C The first event to be triggered in an aspx page is ...
[A]
Render
[B]
Page_Load
[C]
Page_Init
AD .NET Framework has two main components, are (CHOOSE 2)
[A] .NET Framework class library
[B] [Link]
[C] Windows Forms Application
[D] Common Language Runtime
B What is managed code?
[A] It is the code that cannot be directly hosted by the .NET runtime.
[B] It is the code targeting the .NET runtime.
[C] It is used to build the Component Object Model (COM).
[D] It is written by Visual Basic 6.0.
B Which thing is not included in a .NET PE file?
[A] IL
[B] Source code
[C] Resource file
[D] Metadata
B ______are the collection of reusable classes or types
[A] Collections
[B] Class libraries
[C] Namespaces
C What is the name of entity that compiles CIL code into meaningful CPU instructions?
[A] Common Language Specification (CLS).
[B] Common Type System (CTS).
[C] Just-in-time (JIT) compiler.
[D] C# compiler.
A What is the output format of the file the C# compiler produces?
[A] IL
[B] Hex dump
[C] Byte code
[D] Native Machine Code
D Which sentence is correct?
[A] An assembly is a logical compile-time mechanism.
[B] Namespace are runtime entities.
[C] Namespace is a physical run-time mechanism.
[D] A namespace is a logical compile-time mechanism
B Under which of the following environments does your programs execution code run?
[A] CLS
[B] CLR
[C] [Link]
[D] MSIL
D 1. Which sentence is correct?
A. You cannot determine total elements of an ArrayList variable.
B. Elements of an ArrayList variable can have different types.
C. You must specify total elements of an ArrayList variable before declaring it.
D. Stack is a first-in, first-out queue.
C 1. Which parameter modifier marks a parameter as passed by value?
A. ref
B. params
C. None
D. Out
A 1. Which sentence is correct?
A. An interface is name collection of semantically related abstract member.
B. All interface members are implicitly private.
C. Interfaces can provide an implementation of the methods
D. Interfaces can be used to define state data.
AB 1. How do we implement encapsulation? (choose 2)
A. Define a pair of accessor and mulator methods.
B. Define a named property
C. Define a destructor
D. Define a contructor.
B 1. Which sentence is correct?
A. You must specify total elements of a List<T> variable before declaring it.
B. Elements of a List<T> variable cannot have different type.
C. You cannot determine total elements of a List<T> variable
D. Type of a List<T> variable is value type only.
D 1. Which sentence about strong name is correct?
a. Strong name in only friend name of the assembly
b. Strong name includes no more than 128-bit numbers
c. You must create a strong name when building a private assembly
d. Strong name is used to uniquely identify the publisher of a .NET library.
AB 1. What is described in "Win32 process " term? (choose 2)
a. Set of resource, such as external code libraries and the primary thread
b. Necessary memory allocations used by a running application
c. Number of required threads to run the process
d. Necessary CPU's time slot used by a running application
AB 1. Why do we use Thread pool? (choose 2)
a. When using Thread pool, we can focus on our business problem rather than the application's
threading infrastructure.
b. The Thread pool manages thread efficiently by minimizing the number of threads that must be
created, started and stopped
c. Because the Thread pool are always thread with default priority
d. Because the Thread pool are always background threads.
C 1. which sentence about default context is correct?
a. default context is context1.
b. default context is the last context created within an application domain
c. default context is used to group together .NET objects that have no specific or unique
contextual needs.
d. Only default application domain has default context
B 1. can we draw a hexagonal with GDI+?
a. Yes, by using DrawHexagonal method of Graphics object
b. Yes, by using DrawPolygon method of Graphics object
c. NO
D 1. which sentence about the following code is correct?
StreamWriter sw = new StreamWriter("[Link]")
[Link] file "[Link]" does not exist, this code will raise an exception
[Link] file "[Link]" exist, this code will append to this file
c. if file "[Link]" exist, this code will raise an exception
D. if file "[Link]" does not exist, this code will create a new file
A 1. Which sentence is correct?
a. Object graph is a set of related object of serialized object
b. Object graph isgraph of serialized object
c. A serialized object always has an Object graph
d. Object graph have to map to classic OO relationships
C 1. can we cancel closing a form?
a. Yes, by using FormClosed event
b. No
c. Yes, by using FormClosing event
A 1. What is the first event is raised when the form has been allocated on the managed
heap?
a. Load
b. Deactivate
c. Click
d. Activate
D 1. Which event of form handles pressing a key?
a. KeyUp
b. Activated
c. Deactivate
d. KeyDown
B 1. how do we create a control to enter password?
a. Use ComboBox control
b. Use TextBox control with PasswordChar property is set a value
c. Use TextBox control with default properties
d. Use PasswordBox control
B 1. What are states that a CheckBox can have?
a. Checked only
b. Checked, Indeterminate and Unchecked
c. Unchecked only
d. Checked and Unchecked
B 1. Which sentence is correct?
a. Panel controls cannot support scroll bars
b. Panel controls are used to group related controls in a logical unit
c. Panel controls cannot contain other controls
d. Panel controls are not visible at runtime
BD 1. What is spin control?(choose 2)
a. ComboBox
b. DomainUpDown
c. ListBox
d. NumericUpDown
B 1. What is SoapFormatter?
a. SoapFormatter is not a serialization formatter
b. SoapFormatter is a serialization formatter that represents graph as a SOAP message
c. SoapFormatter serialization object graph to a stream using a compact binary format
d. SoapFormatter persists an object graph as an XML document
A 1. What is a third-party data provider?
A. MySQL
B. OLEDB
C. Microsoft SQL Server
D. Oracle
E. ODBC
D 1. Which class is used to insert, remove, evaluate and manipulate the values in a table of
one DataSet?
A. DataColumn
B. DataRow
C. DataView
D. DataTable
C 1. Which information is included in a connection string?
A. Name of machine and name of the database on that machine only.
B. Name of the database on that machine and required security settings only.
C. Name of machine, name of the database on that machine, required security settings and other
data provider-specific information.
D. Name of machine only.
D 1. What is result of the following SQL command?
Select [Link], [Link], [Link], [Link]
From Students Inner Join Classes On [Link] = [Link]
(Assume that all table names and columns are correct)
A. Return all rows with all columns of Students table.
B. Return records that have StudentNo, LastName, FirstName from Students table only.
C. Return records that have ClassName from Classes table only.
D. Return records that have StudentNo, LastName, FirstName from Students table and
ClassName from Classes table.
C In below events of page, which one is raised first?
[A] PreRender
[B] Load
[C] Prelnit
[D] Unload
AD What is method of form to transmit the form data back to web server for processing?
(Choose 2)
[A] Get
[B] Postback
[C] Receive
[D] Post
D Which sentence is correct?
[A] A web server provides Mail Exchange service only.
[B] A web server is a collection of files and related components.
[C] A web server provides File Transfer Protocol service only.
[D] A web server is a software product in charge of hosting your web applications.
C Which sentence is correct?
[A] [Link] supports multi-file model only.
[B] Performance of single-file model is the same as of multi-file model.
[C] [Link] supports single-file model only.
[D] Performance of single-file model is better than of multi-file model.
[E] Performance of single-file model is less than of multi-file model.
A Which sentence about ViewState is correct?
[A] Values of each GUI widget on the page are stored in a hidden form field.
[B] Values of each GUI widget on the page are included in a no-encoded string.
[C] Values of each GUI widget on the page will be destroyed after a period of time.
[D] Values of each GUI widget on the page are stored in a server-side variable.
B What are building blocks of an XML Web service?
[A] A discovery service and a transport protocol.
[B] A discovery service, a description service and a transport protocol.
[C] A description service and a transport protocol.
[D] A discovery service and a description service.
A 1 _____is any action directed at the application.
[A] Event
[B] Method
[C] Class
[D] Object
CD Which of the following statement with respect to Data Grid control are True? (Choose all
correct answers)
[A] By default, the DataGrid display 1 page at a time.
[B] When the DataGrid control is set to a valid data source, the control is populated
automatically
[C] Each field in the DataGrid is bound to a single column based on the DataSource
[D] The DataGrid control display data in tabular format and optionally supports data editing.
D The method can be used to draw a rectangle or a square depending on the coordinates
passed as its argument.
[A] FillSquare
[B] FillRectangle
[C] DrawSquare
[D]DrawRectangle
A _____it the normal ouput type for a WinForm project
[A] Windows Application
[B] Console Application
[C] Class Library
[D] Windows Forms
D 14 The ____control groups a set of controls within a non-labeled an scrollable frame
[A] PictureBox
[B] Tab
[C] Frame
[D] Panel
D The ____feature of Windows Installer provider a standard method for distributing
components and ensures that the installed component is of the correct version.
[A] VersionUpdate
[B] CAB
[C] Msi
[D] Merge Modules
E To create an instance of the Font class using existing Font and FontStyle, the constructor
is:
[A] public void Font(string fontname, float size);
[B] public Font(FontStylefs, Font f);
[C] public void Font(Font f, FontStylefs);
[D] public Font(Font f, FontStylefs);
[E] public Font(string fontname, float size);
A Which namespace is [Link] contains classes that help in constructing and sending
emails?
[A] [Link]
[B] [Link]
[C] [Link]
[D] [Link]
D ____property of a connection object is used to get or set the string used to open a
database
[A] ConnectionParams
[B] ConnectionInfo
[C] StringConnection
[D]ConnectionString
A ____property is used to get or set the shortcut menu associated with the control.
[A]PopUpMenu
[B] SubMenu
[C] ContextMenu
[D] MainMenu
D To get values of the columns of the i-th row in a DataTable object named datatable, what
of the follwings is correct?
[A] DataColumn array = [Link][i].ItemArray;
[B] String[]array = [Link][i].ItemArray;
[C] Object[]array = [Link][i].ItemArray;
[D]DataRow array = [Link][i].ItemArray;
D What mode is [Link] allow you to step through each line of code and trace the
execution of your application?
[A] Neither Debug Mode nor Release Mode
[B] Both Debug Mode and Release Mode
[C] Release Mode
[D] Debug Mode
C What mode is [Link] allow you create a portable exe(EXE) file?
[A] Neither Debug Mode nor Release Mode
[B] Debug Mode
[C] Both Debug Mode and Release Mode
[D] Release Mode
A What statement in the followings is correct
I. The instance properties and methods are those, which are common to all the instances of the
class.
II. The shared properties and methods are those, which are specific to a particular instance.
[A] Both of I and II statements are correct
[B] Both of I and II statements are incorrect
[C] Only II statement is correct
[D] Only I statement is correct
A [Link] provides features for accessing traditional databases like SQL Server as well
as databases, which are accessed using ____.(choose all correct answers)
[A] ODBC
[B] [Link]
[C] OLEDB
[D] XML
[E] DataSets
D The____ event of the PrintDocument class is triggered immediately before each
PrintPage event ocurs.
[A] StartPrint
[B] BeginPrint
[C] PrintPage
[D] QueryPageSettings
D Which namespace does the class ListView belong to?
[A] [Link]
[B] [Link]
[C] [Link]
[D][Link]
D The Pen class belongs to the ____namespace and cannot be inherited
[A] [Link]
[B] [Link]
[C] [Link]
[D][Link]
C Which class represents shortcut menus that can be displayed when the user clicks the
right mouse button over a control or area of the form?
[A] ToolMenu
[B] MainMenu
[C]ContextMenu
[D] FileMenu
F Arrange the sequence in which the key events are triggered
[A] KeyPress, KeyUp, KeyDown
[B] KeyUp, KeyPress, KeyDown
[C] KeyDown, keyPress, KeyUp
[D] KeyPress, keyDown, KeyUp
[E] KeyUp, KeyDown, KeyPress
[F] KeyDown, KeyUp, KeyPress
C What are thee steps involved involved in calling one from another form?(choose all
answers)
[A] Create an instance of the calling form
[B] Create an instance of the form to be called
[C] Invoke Show
C The ____property of the Form control is used to determine whether there are any MDI
child forms open in your MDI application.
[A] ActiveMdiChildren
[B] ActiveMdiChild
[C] IsMdiChild
[D] IsMdiChildren
D A custom control should you use to verify an authorized aplication user called as _____
[A] Composite Custom Control
[B] Standard Control
[C] Single Control
[D] Complex Control
A which class is the base class for all the controls that can be used in Windows Forms?
[A]Control
[B] Controls
[C] Forms
[D] Objects
D The ____ property of the LinkLabel control is used to specity the text, which has to be
displayed as a link.
[A] HyperLink
[B] URLName
[C] LinkName
[D] LinkArea
D GDI + resides in _____ assembly.
[A] [Link]
[B] System
[C] [Link]
[D][Link]
C What of the following are correct for creating a connection object to database named
MyDB? (Choose all correct answers)
[A] SqlConnection con = new SqlConnection("server=myserver;
Integrated Security = SSPI; database=MyDB");
[B] SqlConnection con = new SqlConnection("server=myserver"
Intergrated Security=SSPI; Data Source=MyDB);
[C]SqlConnection con = new SqlConnection("Data Source=myserver;
Integrated Sercurity=SSPI; Initial Catalog=MyDB");
D The view types supported in Winforms are (choose all correct answers)
[A] Text with large icons
[B] Text only
[C] Text with small icons
[D] Report view
D In WInforms , specify method used to specidy the next control to be navigated according
to the tab order
A. SetNextTab
[Link]
[Link]
[Link]
D How many classes can a single .NET DLL contain?
A .3
B .1
C.2
D .As much as you want
A Session variables can be any valid .NET Framework type?
A .Yes
B. No
C What tags do you need to add within the asp:datagrid tags to bind columns manually?
[A]
Inside tag in asp:Datagrid we set Text attribute to <%# [Link] ([Link]
"Col_Name") %>
[B]
Inside tag in asp:Datagrid we set Text attribute to <%# [Link](~Col_Name~
[Link]) %>
[C]
Inside tag in asp:Datagrid we set Text attribute to <%# [Link]([Link]
"Col_Name") %>
[D]
Inside tag in asp:Datagrid we set Text attribute to <%# [Link](~Col_Name~
[Link]) %>
AB Choose 2 correct statements about the ViewState and SessionState
A. ViewState persist the values of controls of controls of particular page in the client(Browser)
when post back operation done. WHen request another page previous page
B. SessionState persist the values of controls of controls of particular page in the client(Browser)
when post back operation done. WHen user request another page previous
C . SessionState persist the data of particular user in the server .This data available till user close
the browser or session time completes
D . View State persist the data of particular user in the server . This data available till user close
the browser or session time completes
B How to use a checkbox in a data grid (in WebForms)?
[A]
Use Template Fields.
[B]
Use DataBound Fields.
[C]
None of the above.
C To perform a change to a table using the Command object named Cmd, what statement of
the following is correct?
[A]
[Link]()
[B]
[Link]()
[C]
[Link]()
[D]
[Link]()
[E]
[Link]()
D What is not a component of [Link] AJAX Server Framework?
[A]
Microsoft AJAX Library
[B]
Web Services bridge
[C]
[Link] 2.0 Ajax Server Extensions
[D]
Ajax-enabled [Link] Pages
D The two built-in channels available in .NET Framework are ... and ...
[A]
XML, SOAP
[B]
Client, Server
[C]
NetBIOS, SPX
[D]
TCP, HTTP
C A Delegate object
A . is mutable
B . Is an instance of a class
C . Is created with the new operator
D. is static object
C How can we add a row is in a Data Table object ?
[A]
We can use the NewRow method of DataTable class
[B]
We can use the Insert method of DataTable class
[C]
We can use the Add method of DataTable
C Which control is not used to receive information?
A. ComboBox
B . TextBox
C. Label
D . ListBox
C Which of the following statements with respect to [Link] are True? (Choose all correct
answers)
[A]
When we use the DataSet object [Link] is based on disconnected data access.
[B]
[Link] objects are all strongly typed.
[C]
Systems built on [Link] are intrinsically highly scalable.
[D]
In [Link], the RecordSet is bound to the data source
B Where is a protected class-level variable available?
[A]
It is available only in this class.
[B] )
It is available to any sub-class derived from base class.
[C]
It is available to any classes in the same assembly.
[D]
It is available to all other classes.
B What is the correct way of creating a DataTable in a DataSet?
[A]
D ataTab 1 e dtO rd e rs;
[B]
DataTable dtOrders = new DataTable("Orders");
[C]
DataTable dtOrders = DataTable("Orders");
[D]
ds.T [Link]("Orders");
A What does the following SQL statement return, assuming that all tables and column
names are correct?
SELECT FirstName, StreetAddress FROM Employees JOIN AddressBook
ON [Link] = [Link]
[A]
Only the matching records from the two tables.
[B]
All the records from the StreetAddress table and only the matching records from the Employees
table.
[C]
Nothing, the JOIN syntax is wrong.
[D]
All the records from the Employees table, and only the matching ones from the StreetAddress
table
B The variable of which type is not signed number ?
A. int
B . Byte
C . short
D. long
D Override method
[A]
Is declared with virtual keyword.
[B]
Has different declared accessibility with overridden base method.
[C]
Is a method overridden by an override declaration.
[D]
Is an instance method declaration includes an override modifier,
AB What are kinds of constranint in [Link]?(choose 2)
A . UniqueConstraint
B. ForeignKeyConstraint
[Link]
[Link]
AD ____are the visual effects supported in WinForms
[Link] Anchoring
B. Transparent Forms
C. Class Libraried
D. Control Docking
E . Opaque Forms
F .Visual Inheritance
A _____ property is used to get or set the data source that GridView is displaying data for
A. DataSource
[Link]
C. DataSet
[Link]
[Link]
C What is different between [Link] and [Link] ?
A. [Link] is used to transfer the execution from current page to another page , but
[Link] does not transfer the execution
B. No difference
C. [Link] returns the execution back to the current page, and [Link] transfers
the execution completely to the specified page
D. [Link] returns the execution back to the current page, and [Link] transfers
the execution completely to the specified page
CD Choose conrrect statements about User Controls (choose 2)
A .We cannot edit the content of a User control
B. A User control consisrs of previously built server controls (called constituent controls when
used within a user control)
C.A User control has an interface that can be completely edited and changed
D. A User control is a server-side component that is shopped with .NET Framework
E . A User control is a compiled DLL file and cannot be edited
C Choose the concept that is not related to [Link] security.
A. Roles
B. Credentials
C, ViewState
D. Anonymous
A Câu 2____property is used to get or set the object that contains data about the control.
[A] Value
[B] Tag
[C] Text
[D] Name
B Câu 8 Name the object which notifes other objects about an event
[A] Consumer
[B] Publisher
[C] Subscriber
[D] Tester
B Câu 12Images can be drawn using the _____method to of the Graphics class.
[A] PaintImage()
[B] DrawImage()
[C] CreateImage()
[D] FromImage()
B Câu 19 OLE is the abbreviation for ____
[A] Object Like Environment
[B] Object Linking and Embedding
[C] Object Linking Environment
[D] Object Linking and Empower
B Câu 22
Statement 1: Tree View displays items like folders, drives etc.
Statement 2: List View display items like current folder contents.
[A] Only statement 2 is true
[B] Both the statements are true
[C] Only statement 1 is true
[D] Both the statements are false
BDEF Câu 25 When a Data Form is created using the Data Form Wizard, which of the
following classes are used by default?(Choose all correct answers)
[A] OleDbDataWriter
[B] OleDbDataAdapter
[C] OleDbStatement
[D] OleDbDataReader
[E] OleDbConnection
[F] OleDbCommand
A Câu 33 [Link] is an important____of the class libraries in .NET
framework?
[A] Namespace
[B] Class
B Câu 36 Link Lable is commands control?
[A] False
[B] True
[C] There is no link label control
DEF Câu 37 Brushes can be created using one of the following classe(Choose all correct
answers)
[A] ThinBrush
[B] ThickBrush
[C] PlainBrush
[D] TextureBrush
[E] SolidBrush
[F] LinearGradientBrush
[G] GradientBrush
AC Câu 40 [Link] provides features for accessing traditional databases like SQL Server
as well as databases, which are accessed using ____.(choose all correct answers)
[A] ODBC
[B] [Link]
[C] OLEDB
[D] XML
[E] DataSets
D Câu 44 ___is the easiest way to allow the user to interact with the application.
[A] Label control
[B] Text control
[C] Button control
[D] Form
CD Câu 53 List the key elements of COM (choose all correct answers)
[A] A set of theorems which must be proven for checking the correctness of the object model
[B] A set of graphical symbol for modeling the objects
[C] A set of services for creating and exposing the classes
[D] A set of specifications defining the programming protocol
CE Câu 54 ____ are the Print support controls provided by WinForms.(Choose all correct
answers)
[A] PrintPreview
[B] PrintFile
[C] PrintPreviewControl
[D] PrintDirectory
[E] PrintDocument
B Câu 57 Class Library is one of the main components of the .NET framework and is
divided in to ____
[A] Namespaces
[B] DLL components
[C] GUI components
B Câu 58 To bind data to controls as ListBox, ComboBox, DataGrid, what type of data
bindings shoud you use?
[A] Hybrid Data Binding
[B] Complex Data Binding
[C] Simple Data Binding
[D] Structured Data Binding
AB Câu 62 The types of list box supported in Winforms are(Choose all correct answers)
[A] ListBox
[B] CheckedListBox
[C] ComboBox
[D] DropDownbox
B Câu 64 Which Control is used to display the current status of the application using
framed windows?
[A] TreeView
[B] StatusBar
[C] ToolBar
[D] ListView
A Ques 1 : What namespace does the Web page belong in the .NET Framework class
hierarchy?
(A) [Link]
(B) [Link]
(C) [Link]
D Ques 2 : ______________is the first method that is fired during the page load.
(A) PreRender()
(B) Load()
(C) Unload()
(D) Init()
B Ques 3 : Which of the following tool is used to manage the GAC?
(A) [Link]
(B) [Link]
(C) [Link]
(D) [Link]
D Ques 5 : What namespace does the Web page belong in the .NET Framework class
hierarchy?
(A) [Link]
(B) [Link]
(C) [Link]
(D) [Link]
A Ques 6 : Which method do you invoke on the Data Adapter control to load your
generated dataset?
(A) Fill( )
(B) ExecuteQuery( )
(C) Read( )
A Ques 7 : What class does the [Link] Web Form class inherit from by default?
(A) [Link]
(B) [Link]
(C) [Link]
(D) [Link]
A Ques 8 : Custom Controls are derived from which of the classes
(A) [Link]
(B) [Link]
(C) [Link]
B Ques 9 : Which one of the following is the fastest way to concat strings in [Link]?
(A) Concat method of the String object
(B) Append method of the StringBuilder object
(C) Plus sign operator to concatenate the strings
(D) Substring method of the String object
D Ques 11 : We can manage states in [Link] application using
(A) Session Objects
(B) Application Objects
(C) Viewstate
(D) All of the above
A Ques 13 : When does Garbage collector run?
(A) When application is running low of memory
(B) It runs random
(C) When application is running for more than 15 minutes
(D) None of the above
B Ques 14 : Which of the following is true?
(A) User controls are displayed correctly in the Visual Studio .NET Designer
(B) Custom controls are displayed correctly in [Link] Designer
(C) User and Custom controls are displayed correctly in the Visual Studio .NET Designer.
B Ques 15 : [Link] 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
A Ques 16 : When is the user controls code is executed
(A) After the webform loads
(B) After the page_init event of webform
(C) Before Page_init event of web form
D Ques 17 : Which of the following object encapsulates the state of the client and the
browser?
(A) Server object
(B) Request object
(C) Response object
(D) Session object
C Ques 19 : File extension used for [Link] files.
(A) .Web
(B) .ASP
(C) .ASPX
(D) All of the above
A In your [Link] web application you want to display a list of clients on a Web page.
The client list displays 10 clients at a time, and you require the ability to edit the clients. Which
Web control-
A. The GridView control
B. The DetailsView control
C. The FormView control
D. The Table control
B In your [Link] 2.0 web application you want to display an image that is selected from
a collection of images. What approach will you use to implementing this?
A. Use the ImageMap control and randomly select a HotSpot to show or hide.
B. Use the AdServer control and create an XML file with configuration of the control.
C. Use an ImageButton control to predict randomness of the image to be loaded based on the
clicks of the control.
D. Use the Image control to hold the image and a Calendar control to randomly select a date for
each image to be displayed.
C How to find out what version of [Link] I am using on my machine?
A. [Link]([Link]() );
B. [Link]([Link]() );
C. [Link]([Link]() );
D. not possible
D Which language is used to create an [Link] code file? A. Visual Basic
B. C#
C. C++
D. All of the above
A The feature in [Link] 2.0 that is used to fire a normal postback to a different page in
the application is called
A. Cross Page Posting
B. Code-front
C. Theme
D. None of the above
A In [Link] what does the following return < %
[Link]([Link]()) % >
A. Gives the memory working set
B. Return Null value
C. Gives Error
D. None of the Above
A Output : [Link] = True [Link] = Now().Subtract(New
TimeSpan(1, 0, 0, 0)) [Link] = 0 [Link] = "no-cache"
A. Avoid page to be cached
B. Clears the buffer area
C. The session expires
D. None of the Above
D What is the transport protocol used to call a webservice
A. TCP
B. HTTP
C. SMTP
D. SOAP
C What is a diffgram ?
A. Finds the difference in two objects
B. Finds the difference in two files
C. The one which renders the dataset object contents to XML
D. None of the above
A What is the significance of [Link]( )
A. Adds HTTP Headers to output stream
B. Adds Tag to rendered Page
C. Add Headers to the web site
D. None of the above
A Which of these data source controls do not implement Caching?
A. LinqDataSource
B. XmlDataSource
C. SqlDataSource
D. ObjectDataSource
C Which of the following is a requirement when merging modified data into a DataSet?
A. The DataSet schemas must match in order to merge
B. The destination DataSet must be empty prior to merging
C. A primary key must be defined on the DataTable objects
D. A DataSet must be merged into the same DataSet that created it.
D Where we can assign value to Static read only member variable of a static class?
A. Parameterized constructor
B. On click of button
C. [Link]
D. Default constructor
A An organization has developed a web service in which the values of the forms are
validated using [Link] application. Suppose this web service is got and used by a customer
then in such a scenario whi
A. The customer can run on any platform.
B. Such a situation cannot happen at all
C. The customer must be having technology that run ASP.
D. None of the Above
C Which of the following denote page code model in [Link]?
A. single-file
B. code-behind
C. Both (a) and (b)
D. None of the Above
A The control used in [Link] to display information from data set but with better
formatting and editing behavior is
A. DataList
B. Button
C. Panel
D. None of the Above
B asp:dropdownlist> tag replaces which of the HTML tags
A. < List >
B. < Select >
C. < Option >
D. None of the above
B How do you trace the application_End event on runtime?
A. By Debugging
B. Can not be done
C. By Tracing
D. By Stopping
B Whats the significance of [Link]( )
A. Maps the specified absolute path to virtual path
B. Maps the specified virtual path to a physical path
C. All of the above
D. None of the above
C Whats is the significance of [Link]( )
A. Clears all the section value from rendered HTML File
B. Clears the content of the Rendered page
C. Clears all Headers from the buffer stream
D. None of the above
B What is the difference between HTTP handlers & HTTP modules
A. Httphandler is an event handler and httpmodule is module to do some task
B. Httphandler is an class and Httpmodule is an assembly
C. All of the above
D. None of the above
D Which namespace allows us to formauthentication ?
A. [Link]
B. [Link]
C. [Link]
D. [Link]
C Which method displays the custom control
A. Display
B. Page_Load
C. Render
D. The Prerender
B Client Sertificate is a collection of
A. Response
B. Request
C. Collection
D. Server
C What section of the [Link] file is used for storing a list of authorized users?
A. securityPolicy
B. authentication
C. authorization
D. None of the above
A How do you add [Link] 3rd party component
A. Add reference of dll file and place the code where ever required
B. By add/Remove items in the project menu
C. Cannot add 3rd party component to [Link]
D. None of the above
A In .NET the operation of reading metadata and using its contents is known as
________________
A. Reflection
B. Enumeration
C. Serialization
D. Binding
A What is a strong name?
A. Combination Of both Public,Private key and digital signature
B. Public Key
C. Private Key
D. Digital signature
C What is the purpose of Reflection?
A. For finding path of an assembly
B. For knowing version of assembly
C. For Reading metadata at runtime
D. None of the above
C Custom Controls are derived from which of the classes
A. Website
B. WebForm
C. Webfarm
D. None of the above
A How do you disable client side validation ?
A. Set the ClientTarget property to Downlevel
B. Set the Runat property to server
C. Set the inherits property to codeb
D. Set the language property to C#
C Select the validation control used for "PatternMatching"
A. RangeValidator
B. PatternValidator
C. RegularExpressionValidator
D. FieldValidator
C The Following are the minimum requirement to run [Link] pages
A. Windows explorer
B. Java Virtual Machine
C. Common Language Runtime
D. All of the above
C What executable unit gets created when we build an [Link] application?
A. . EXE
B. . COM
C. . DLL
[Link] of the above
B Which of the following is used to write error message in event Log File?
A. [Link]
B. [Link]
C. [Link]
D. All of the above
C In [Link] page framework an automatic way to associate page events and methods is
A. It is not possible to set automatically page events and methods
B. AutoEventWireup attribute of the Page directive is set to False
C. AutoEventWireup attribute of the Page directive is set to true
D. All of the above
A In [Link] if one wants to set the focus on a particular control
[Link] FOCUS method
[Link] SETCONTROL
[Link] SETFOCUS
[Link] of the above
D Give one word: What model does [Link] request processing is based on
A. Top-down
B. Bottom-up
C. Waterfall
D. Pipeline
C If in an [Link] application one want to create http handlers which of the interface is
used
[Link]
[Link]
[Link]
[Link] of the above
A To set page title dynamically in [Link] which of the following is used?
A. < head > section
B. < tail > section
C. < sheet > section
D. None of the above
B In [Link] application the [Link] file lie in which directory
A. System
B. ROOT
C. Application
D. None of the Above
D Which of the following can be used to debug .NET application?
A. Visual Studio .NET
B. Runtime Debugger
C. [Link] classes
D. All of the above
B Forms based authentication is otherwise called in [Link] as Cookie Authentication
because Forms authentication uses cookies to allow applications to track users throughout their
visit.
A. Passport Authentication
B. Cookie Authentication
C. Windows Authentication
D. None of the Above
C Which of the following is true about session in [Link]?
A. The default time interval is 5 minutes
B. Programmers has to take care of delete sessions after configurable timeout interval
C. [Link] automatically delete sessions after configurable timeout interval
D. None of the Above
D In [Link] if one wants to maintain session then which of the following is used?
A. Microsoft SQL Server
B. Session State Service
C. In-process storage
D. All of the above
A I have an [Link] application. I have a page loaded from server memory. At this
instance which of the following methods gets fired
A. Load()
B. Unload( )
C. PreRender( )
D. None of the Above
C The GridView control in [Link] has which of the following features
A. Automatic paging
B. Automatic data binding
C. Both (a) and (b)
D. None of the above
A If one uses [Link] configuration system to restrict access which of the following is
TRUE?
A. The access is restricted only to [Link] files
B. The access is restricted only to static files and [Link] resources.
C. Both (a) and (b)
D. None of the Above
D Which of the following denote New Data-bound Controls used with [Link]
A. SqlDataSource
B. FormView
C. GridView
D. All of the above
A A developer wanted to achieve graphics in his display using [Link]. Which of the
following web controls are available in [Link] to achieve the above?
A. AdRotator
B. LinkButton
C. Both (a) and (b)
D. None of the Above
C [Link] separates the HTML output from program logic using a feature named as
A. Code-front
B. Exception
C. Code-behind
D. All of the above
A If a developer of [Link] defines style information in a common location. Then that
location is called as
A. Theme
B. Master Page
C. Customization
D. None of these
B In [Link] if you want to allows page developers a way to specify static connections in
a content page then the class used is
A. [Link]
B. ProxyWebPartManager
C. WebPartManager
D. None of these
A In [Link] if one uses Windows authentication the current request attaches an object
called as
[Link]
[Link]
[Link]
[Link] of the Above
D It is best to use a web instead of a windows application when the application?
A. needs to be available to the public
B. must be platform-independent
C. has a thin front end (client)
D. All of the above
C Which property is used to name a web control?
A. ControlName
B. Designation
C. ID
D. Name
C On which of the operating system below [Link] can run?
A. Windows XP Professional
B. Windows 2000
C. Both (a) and (b)
D. None of these
B Which of the following denote the web control associated with Table control function of
[Link]?
[Link]
[Link]
[Link]
[Link] the Above
B Which of these files takes the web application in offline mode?
A.app_offline.html
B.app_offline.htm
[Link]
[Link] of these
A Which of these classes maps to the tag < input type="checkbox"/>
A. HtlmInputCheckBox
B. HtmlCheckBox
C. HtmlControl
D. None of these
C In order to prevent a browser from caching a page which of these xstatements should be
written?
A. [Link]();
B. [Link]();
C. [Link]();
D. None of these
D An [Link] page uses a Datagrid displays employee [Link] Web application
supports a large number of concurrent users, who will be saving data from the grid back to the
database.
A. Use View State
B. Use URL munging
C. Disable ViewState and use Session State
D. Disable View State and don't use session state
C Which Kind Of data we can store in viewstate
A. Viewstate can store onlys string
B. Viewstate can store anything
C. Viewstate can store only serilizable object
D. None of these
D What is/are the predefined TraceListener(s) in [Link]
A. EventLogTraceListener
B. TextWriterTraceListener
C. DefaultTraceListener
D. All of the above
B We have defined one page_load event in aspx page and same page_load event in code
behind who will run first?
A. page_laod event in aspx page
B. page_load event in code-behind
C. both will run simultaneously
D. None of these
A Which of the following represents the best use of the Table, TableRow, and Table-Cell
controls?
A. To create a customized control that needs to display data in a tabular fashion
B. To create and populate a Table in Design view
C. To create and populate a Table with images
D. To display a tabular result set
D Which class can be used to create an XML document from scratch?
[Link]
[Link]
[Link]
[Link]
B Which class can be used to perform data type conversion between .NET data types and
XML types?
[Link]
[Link]
[Link]
[Link]
C How to implement authentication via [Link]?
A. Include the deny element.
B. Include the identity element.
C. Include the authorization element.
D. Include the authentication element.
A What is the maximum number of cookies that can be allowed to a web site?
A.1
B.10
C.20
D.30
B Which one of the following namespaces contains the definition for IdbConnection?
A. [Link]
B. [Link]
C. [Link]
D. [Link]
D Which property of the session object is used to set the local identifier?
[Link]
[Link]
[Link]
[Link]
A Which of the following is true?
A. User and Custom controls are displayed correctly in the Visual Studio .NET Designer.
B. User controls are displayed correctly in the Visual Studio .NET Designer
C. Custom controls are displayed correctly in [Link] Designer
D. None of these
A How [Link] Different from classic ASP?
A. Code is separated from the HTML and interpreted Code is interpreted separately
B. Scripting is separated from the HTML, Code is compiled as a DLL, the DLLs can be executed
on server
C. Scripting is separated from the HTML, Code is interpreted seperately
D. None of these
B The [Link] server control, which provides an alternative way of displaying text on web
page, is
A.< asp:listitem >
B.< asp:label >
C.< asp:button >
[Link] of these
C Which of the following languages can be used to write server side scripting in [Link]?
[Link]
B.C-sharp
[Link] (a) and (b)
D.C++
B What tags one need to add within the asp:datagrid tags to bind columns manually?
A. Set AutoGenerateColumns Property to true on the datagrid tag
B. Set AutoGenerateColumns Property to false on the datagrid tag
C. Set AutomaunalColumns Property to true on the datagrid tag
D. It is not possible to do the operation
B Which of the following is TRUE about Windows Authentication in [Link]?
A. Role membership determined only by user programming
B. Automatically determines role membership
C. [Link] does not support Windows Authentication
D. None of these
C Which of the following can be used to add alternating color scheme in a Repeater
control?
A. DataSource
B. ColorValidator
C. AlternatingItemTemplate
D. None of these
D Suppose a .NET programmer wants to convert an object into a stream of bytes then the
process is called ______________
[Link]
[Link]
[Link]
[Link]
B The technique that allow code to make function calls to .NET applications on other
processes and on other machines is
A..NET Remoting
B..NET Threading
C..NET RMT
[Link] of these
D The namespace within the Microsoft .NET framework which provides the functionality to
implement transaction processing is ....................
A. [Link]
B. [Link]
C. [Link]
D. [Link]
A . The actual work process of [Link] is taken care by _____________
A.aspnet_wp.exe
B.aspnet_isapi.dll
[Link]
[Link] of these
A Which of the following allow writing formatted output?
[Link]()
[Link]()
[Link] (a) and (b)
[Link] of these
D In my .NET Framework I have threads. Which of the following denote the possible
priority level for the threads?
[Link]
[Link]
[Link]
[Link] of the above
D Which of the following is FALSE?
A. [Link] is a major upgrade over ASP
B. ASP+ and [Link] refer to the same thing
C. [Link] applications run without a Web Server
D. None of these
B Which of the following transfer execution directly to another page?
A. [Link]
B. [Link]
C. Both (a) and (b)
D. None of these
C In [Link] in form page the object which contains the user name is ______
A. [Link]
B. [Link]
C. [Link]
D. None of these
D The .NET framework which provides automatic memory management using a technique
called ______________
A. Assemblies
B. Serialization
C. Overriding
D. Garbage Collection
A What is the base class from which all Web forms inherit?
A. Page Class
B. Master Page
C. Session Class
D. None of these
A What attributes do you use to hide a public .Net class from COM?
A. ComVisible attributes
B. DLLImport Attributes
C. COM Interop
D. All of the above
A _________ tests make sure that new code does not break existing code.
A. Integration tests
B. Regression tests
C. Load test
D. Unit tests
---------------------------------------------------
C 1. Unlike const however, read-only fields are NOT______
A. explicitly internal
B. explicitly static
C. implicitly static
D. implicitly internal
C 2. What can be signature of an application's entry point?
A. The method on which a delegate makes calls cannot have any arguments.
C. The method on which a delegate makes calls cannot have return type.
C 5. _______is .NET equivalent of Java Virtual Machine (JVM).
A. CLS
B. CTS
C. CLR
C. Compile error
A. method.
B. enclosing block.
C. application.
D. class.
D 8. Which is the most suitable statement to fill the missing code (line 12), if you want to
build an in-house XML Web service?
A. [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
A. Enumeration.
B. Class.
C. Delegate.
D. Interface.
A 11. What is output of the following code?
using System;
class Program
{
delegate void Display();
static void Main()
{
Display d1 = new Display(DisplayHello);
d1();
}
static void DisplayHello()
{
[Link]("Hello");
}
}
A. Hello
D. Runtime error
D 12. An assembly consists of Assembly Metadata, Type Metadata, ______and______
A. ButtonValue
B. ResultDialog
C. ButonResult
D. DialogResult
E. ReturnValue
B 14. What does [Link] will do?
A. 1
B. 2
C. 3
D. 4
A 17. We can use and methods to ensure that application-level variables are not updated by
more than one user simultaneously.
A. Delegates
D. Structures
A 19. MessageBox is a type of dialog box
A. TRUE
B. FALSE
A 20. Which event is raised when user choose an item in ComboBox control?
A. SelectedIndexChanged
B. Click
C. Validated
D. DropDown
D 21.
// ALl necessary namspaces have already been used.
// Consider the following piece of code:
namespace ConsoleApplication2
{
class MyClass
{
internal int x = 10:
public void myMethod()
{
[Link](x);
}
class Program
{
static readonly MyClass myClass = new MyClass();
static void Main(string[] args]
{
myClass.x = 100:
[Link]();
}}}
//Which of the following statements is correct about the above code?
A. The code will not compile successfully because myClass is a readonly variable, which also
means it is static. You can_____
B. The code will not compile successfully because myClass is a readonly variable and you
cannot change value of a rear______
C. The code will not compile successfully because a readonly class instance cannot access its
internal data.
A. NodeView
B. ItemView
C. TaskView
D. FormView
E. ListView
F. TreeView
C 23. "public", "private", "protected", "internal", "protected internal" keywords are called:
A. Modifiers
B. Delegates
C. Access modifiers
D. Types
D 24. Which method of Command object can be used to update an existing record in one
table of database?
A. ExecuteReader
B. ExecuteScaIar
C. ExecuteXmIReader
D. ExecuteNonQuery
D 25. It is important to understand that the value assigned to a constant variable must be
known at
A. Debug-time
B. Run-time
D. Compile time
D 26. What is state of a thread after creating a Thread object and call the [Link]()
method?
A. Stopped
B. Started
C. Unstarted
D. Running
D 27. Which sentence is correct?
int x = 2009;
decimal y = 2m;
int z = x/y;
A. 1004.5
B. 1005
C. 1004
D. Compile error!
A 29. Which sentence about foreground threads is correct?
A. Foreground threads have the ability to prevent the current application from terminating.
D. Foreground threads are viewed by the CLR as expendable paths of execution that can be
ignored at any point in time.
D 30. Which sentence about DataReader object is correct?
(See picture)
D. The code will be executed successfully and print out some number and then the program is
terminated because this is______
A 32. A class can have _______
A. Request-Response
B. Linear
C. Static
D. Event-driven
C 34. Which sentence about shared assemblies is correct?
B. Shared assemblies are intended to be consumed by the application which resides in the same
directory of them.
A. Constructor
B. Events
C. Methods
D. Properties
C 36. Which sentence is correct?
A. 1
B. 2
C. 4
D. 3
C 38. What is output of this code?
interface CIass1
{
public void SayHeIIo(string yourName);
}
class Class2 : CIass1
{
public override void SayHeIIo(string yourName)
{
[Link]("HeIIo {0}", yourName);
}
cIass Program
{
static void Main(string[] args)
{
Class2 obj = new Class2();
[Link]("VisuaI C#");
}}
A. HeIIo
B. Hello {0}
C. complie error
B 39. What is output of the following code?
using System;
class Program
{
static void Main()
{
try
{
int n1 = 1;
int n2 = 0;
int n3 = n1/n2;
[Link]("try");
}
catch
{
[Link]("catch");
}
finally
{
[Link]("finaIIy");
}}}
A. catch
B. catch
finally
B 40. Which method of the Control class conceals the control from the user?
A. Hide
B. Visible
C. Dispose
D. Close
A 41. Which sentence about MDI application is correct?
A. In a MDI application, if the user maximizes a particular child window, you have to merge the
child's menu system with the parent.
B. MDI applications do not allow user to have multiple child windows open at the same time
within the same topmost window.
A. You cannot use the DirectoryInfo class for operations such as copying, moving, renaming,
creating and deleting directories.
D. You cannot use the Directory class for operations such as copying, moving, renaming,
creating and deleting directories.
D 43. Validity of a page can be checked using the property.
A. ValidateControI
B. ControIToVaIidate
C. IsVaIidControI
D. IsVaIid
A 44. Unboxing is_______
A. Explicit conversion
B. Implicit conversion
B 45. Assume that you create a Web service by Visual C# language. Can you consume this
Web service by a client that is written in Java language?
A. No
B. Yes
C 46. When do we use virtual keyword?
A. Application_Start()
B. Session_Start()
C. Application_End()
D. Session_End()
C 48. What is utility allows you to view the set of all content files and referenced
assemblies?
A. Class View.
C. Solution Explorer.
D. Object Browser.
A 49. A command builder is only able to autogenerate SQL commands for use by a data
adapter, if
A. The Select command interacts with only a single table, the single table has been attributed
with a primary key, and the column(s) representing the primary key is accounted for in you
D. The Select command interacts with only a single table and the single table has been attributed
with a primary key.
A 50. We CANNOT use methods that have some arguments for a delegate?
A. No
C. Yes
A 1. What of the followings is correct if we want to set the AChild form as a child form of
the parent form named TheParent?
A. [Link]= TheParent;
B. [Link] = AChild;
C. [Link] = TheParent;
D. [Link] =true;
E. [Link]=true;
B 2. What is NOT a characteristic of Web Service?
A public
B. internal
C. sealed
D. private
C 4. What is output ofthis code?
class Class1
{
private string name = ".NET Technology";
public string yourName
{
get{ return name;}
set { name = value;}
}
public virtual void SayHello()
{
SystemConsoleWnteLine("Hello {0}', [Link]):
}
}
class Class2: Class1
{
public Class2(string yourName)
{
[Link] = yourName;
}
public override void SayHello()
{
[Link]();
}
}
class Program
{
static void Main(string[] args)
{
Class2 obj = new Class2("Visual C#");
[Link]();
}
}
B. Compile error
C. Hello Visual C#
A. Dock
B. Hang
C. Fixed
D. Anchor
C 6. Which sentence is correct?
B. CLR does not compile the associated ClL into platformI-specific instructions.
C. CLR is the entity in charge of resolving the location of an assembly.
B. Columns, Rows
C. Rows, Constraints
D. Columns, Constraints
A 8. What are system exceptions?
C. System exceptions are custom exceptions thatderive from the SystemException type.
C 9. Which member of SystemThreading namespace is an enumeration?
A ThreadPool
B. ThreadStart
C. ThreadPriority
D. Thread
A 10. The Mask property of MaskedTextBox specifies or retrieves the characters to be used
as a mask
A TRUE
B. FALSE
C 11. An interface CANNOT contain signatures of the following members:
A. Methods
B. Properties
C. Constructor
D. Events
D 12. Which object provides access to the provider's data reader object?
A DataReader
B. DataAdapter
C. Connection
D. Command
A 13. What is output when request the page that contains the code bellow?
A Hello world!
B. <h1>Hello world!<lh1>
C. Compile error
D. [Link]("<h1>Hello world!</h1>")
B 14. Which property of TextBox control to set whether the TextBox control modifies the
case of characters as they are typed?
A. CharacterUpper
B. CharacterCasing
C. CharacterLower
D. PasswordChar
C 15. One of the differences between an abstract class and an interface is?
A An abstract class can inherit another abstract class; an interface cannot inherit another
interface.
B. An abstract class can be created its instance by using new keyword; an interface cannot
A Global. Session
B. Server. Response
C. Application. Request
D. Session. Application
C 17. What is output of the following code?
using System;
class Human
{
~ Human()
{
[Link]("Destructor of Human class'):
}
}
class Student: Human
l
~Student()
{
ConsoleWriteLine(''Deslructor of Student class");
}
}
class Program
l
static void Main()
{
{Student s = new Student();}
}
}
A Destructor of Student class
A Delegates
B. Types
C. Members
D. Attributes
B 19. Which sentence about thread pool is correct?
A StatusBar
B. ComboBox
C. Label
D. ToolBar
A 21. Which sentence about single-file assemblies is correct?
C. Single-file assemblies do not contain all the necessary CIL metadata. and associated manifest
in an autonomous. single. well-defined package.
A. 1
B. 0
C. Compile error
D. null
B 25. Which property of the TextBox control modifies the case of characters as they are
typed?
A. CharacterLower
B. CharacterCasing
C. CharacterUpper
D. PasswordChar
C 26. When you create ___ type. you ensure that the type can be accessed from other types
in the current assembly as well as external assemblies.
A private
B. internal
C. public
D. seal
A 27. What is the lifespan for items stored in ViewState?
B. 2 seconds
C. 2 minutes
D. 20 minutes
C 28. What is advantage of code-behind page model ?
A Session_End()
B. Application_End()
C. Session_Start()
D. Application_Start()
D 31. What is output of the following code?
List<int> array1 = new List<int>():
foreach (int n in array1)
[Link]([Link]()):
A. Compile error
B. 0
C. array1
D. Nothing
A 32. The ___ control is used when a field must not be left blank
A RequiredFieldValidator
B. RangeValidator
C. CustomValidator
D. RegularExpressionValidator
C 33. Which sentence about shared assemblies is correct?
B. Shared assemblies are intended to be consumed by the application which resides in the same
directory of them.
A BufferedStream provides temporary storage for a stream of bytes that may be committed to
storage at a later time.
B. BufieredStream provides random access to streamed data stored in memory rather than a
physical file.
C. BufieredStream allows for random file access with data represented as a stream of bytes.
A ToolStripButton
B. ToolStripTextBox
C. ToolStripLabel
D. ToolStripF'rogressBar
B 36. Which sentence is correct?
B. Override method and overridden base method have to have the same return type.
D. Override method and overridden base method don't have the same declared accessibility.
D 37. Which object represents the actual data of a DataTable?
C. A view object
A RangeValidator
B. CustomValidator
C. RequiredFieldValidator
D. CompareValidator
B 39. A class can have ___
C. params only.
A No
B. Yes
C 42.
delegate void ShowMessage();
static void HelloWorld()
{
[Link]("Hello world");
}
static void Hello()
{
[Link]("Hello visual C#");
}
static void Main(string[] args)
{
ShowfMessage s = new ShowMessage(HelloWorld):
s += Hello;
s();
}
A Hello world
B. Compile error
C. Hello world
Hello visual C#
D. Hello visual C#
B 43. Which sentence [Link] assemblies is correct?
A .NET assemblies are described using COM type libraries.
D. .NET assemblies export methods to facilitate communications with the COM runtime.
C 44. Given the following code segment whatwill the value returned from the method be?
A 491
B. 42
C. 504
D. Runtime error. Null Pointer exception!
A 45. Where do we can change default namespace of a project?
B. When working with DataSet a connection must be established with the data source.
C. When we changes data in a DataSet this change is automatically updated to the data source.
B. CTS is a formal specification that documents how types mustbe defined in order to be hosted
by the CLR
D. CTS is a language that sits above any particular platform-specific instruction set.
C 49. The name of an assembly consists of 4 parts:
1. The short name. On Windows this is the name of the Portable Executable file without the
extension
2 The culture.
3. The version.
4. A/an ______
C. strong name
using System;
class Program
{
delegate void Display():
static void Main()
{
Display d1 = new Display(DisplayHello);
d1();
}.
static vord DisplayHello()
l
[Link](''Hello");
}
}
A Runtime error
B. Hello
C. Compile error at line: d1():
D. Compile error at line: delegate void Display();
D 1. Which of following extension does a Web service file will have?
A. ascx
B. aspx
C. resx
D. asmx
D 2. Boxing is
A. Command
B. DataAdapter
C. Connection
D. DataReader
B 4. You have a code library that was written by C#. Can you use this library with
[Link]?
A. No
B. Yes
C 5. What is term for conversion from a value type to an object?
A. Explicit conversion.
B. Implicit conversion.
C. Boxing.
D. Unboxing.
B 6. Which sentences are correct?
B. A form is a class.
C. A form is only used to present information to the user.
B. Web services allow invoking methods and properties of a remote object using standard HTTP
request.
D. Programs that are written in Java cannot use the web service which is created by a .NET
language.
C 8. What is output of the following code?
using System;
class Program
{
delegate void Display();
static void Main()
{
Display d1 = new Display(DisplayHello);
d1();
}
void DisplayHello()
{
[Link]("Hello");
}
}
C. Hello
C 11. What are client-side script languages?
A. VBScript only.
B. JavaScript only.
A. TRUE
B. FALSE
D 14. What is output of this code? (Assume that cn is correct and table name is exact.)
[Link]-SqlCommand cmd = [Link]();
[Link] = "Select * from Customers";
[Link]([Link]().ToString());
A. Compile error
B. 1
C. 0
D. -.1
C 15. By setting the Text property on the form, you will cause the value of the Text
property to display on which part of the form?
A. Status bar
B. Top-right corner
C. Title bar
D. Bottom-right corner
C 16. How many interfaces a class can implement?
B. Only one.
C. Many.
D 17. Which of the following associations of try, catch and finally is INVALID?
A. TRUE
B. FALSE
D 19. What is output of the following code?
static void Main(string[] args)
{
[Link] newArray = new [Link]();
[Link]("August");
[Link](2010);
foreach (object oneItem in newArray)
[Link]([Link]().ToString());
}
A. Compile error
B. Runtime error
C. August
2010
D. [Link]
System.lnt32
C 20. What is different between namespaces and assemblies?
A. A namespace can contain many classes, but an assembly can include only one class.
B. A namespace can contain only one class, but many classes can reside in an assembly.
1) The Deactivate event occurs when the user switches away from the from and concentrates on
other form
2) The FormClosing event arises when the form is in its hiding state
3) The FormClosed event arises when the form is closing
A. Statement 1 is correct
B. Statement 2 is correct
C. Statement 3 is correct
D. All statements are correct
D 23. Which control is used to display text only?
A. TextBox
B. RadioButton
C. CheckBox
D. Label
B 24. Which sentence about Cookie is correct?
C. The exact location of cookie files does not dependent on which browser is using.
D. Cookie is often realized as a text file on the web server.
B 25. Look at the following statements:
(A) A given class (or structure) may define only a single static constructor
(B) A static constructor executes exactly one time, regardless of how many objects of the type
are Created
(C) A given class (or structure) may define many static constructors
A. Private
B. Internal
C. Protected
D. Public
D 27. Determine the output of the following code segment:
int x = 2009;
int y = 2010;
class Program
{
delegate double Unary(double n1);
static double Power(double n1, double power)
{
return ([Link](n1, power));
}
static void Main(string[] args)
{
Unary u1 = new Unary(Power); [Link](u1(9,3).ToString());
}
}
A. 9
B. 729
C. 3
D. Compile error
D 29. In [Link] application, ...... and ........ variables can be accessed by all the pages in
the application.
A. Application, Request
B. Global, Session
C. Server, Response
D. Session, Application
C 30. __________ enables the possibility for a function to be polymorphic when it is
overridden in one or more inherited classes.
A. static
B. parameterized
C. virtual
D. overridden
B 31. Interface references CANNOT be obtained through:
A. Explicit cast
B. The is keyword
C. The as keyword
B 32. NET Framework has two main components, are
A. Class
B. Interface
C. Enumeration
D. Delegate
A 34. Can a namespace be resided into many assemblies?
A. Yes
B. No
A 35. A web service which conforms to WSI basic profile 1.1 can include some methods
that have the same name.
A. No
B. Yes
A 36. Which of the following classes can be used to read/write textual information from/to
a block in memory?
A. StreamReader/StreamWriter
B. StringReader/StringWriter
C. File
D. BinaryReader/BinaryWriter
D 37. Assume you wish to build a Web page to show list of products in database. What is
the most suitable method for this task?
A. Use XML
B. Use Client-Side scripting
C. Use HTML
B. The thread pool manages threads efficiently by minimizing the number of threads that must be
created, started, and stopped.
D. You cannot reuse the library which is written by C# in any other .NET programming
language.
C 41. Responsibilities of CLR are compiling source codes into an assembly and loading the
type into memory.
A. Yes.
B. No, responsibilities of CLR are loading the type into memory and compiling CIL into
platform-specific instruction.
C. No, responsibilities of CLR are compiling source codes into an assembly and resolving the
location of an assembly.
D. No, responsibilities of CLR are compiling source codes into an assembly and executing the
code.
C 42. Can we check whether an .aspx page is posted back to the server?
B. No
A. CIL code
D. Type metadata
B 44. Can we create a custom Windows Forms control in C#?
A. No
B. Yes
C 45. What is state of a thread after creating a Thread object?
A. Started
B. Stopped
C. Unstarted
D. Running
B 46. Which type of the [Link] namespace can be used to resolve the issue of
concurrency?
A. ThreadPool
B. Timer
C. Monitor
D. Thread
C 47. Determine the output of the following code segment:
int x = 2009;
int y = 2010;
[Link] ("The value of x | y is : {0}", (x | y));
A. 2010
B. 2009
C. 2011
D. Compile error!
A 48. Which event we can place code in which to initialize variables once during session
start?
A. Session_Start
B. Application_Start
C. Session_End
D. Application_End
C 50. What is output of the following code?
using System;
class Program
{
static void Main()
{
Display<System.lnt32>();
}
static void Display<T>()
{
[Link](typeof(T).ToString());
}
}
A. Compile error
B. Runtime error
C. System.lnt32
D. ToString()
A 1. Complete this sentence: At the heart of events are____
A. Delegates
B. Buttons
C. Methods
D. Threads
A 2. What is WSDL?
C. Is based on HTML.
D. ls executed by client
B 3. Which control allows selecting more than one item?
A. ComboBox
B. ListBox
C. DateTimePicker
D. TextBox
A 4. Which variables can use only by one user but in all pages?
A. Session
B. Application
C. ViewState
D. Cookie
B 6. By default, can we delete a folder that contains subdirectories and files?
A. Yes
B. No
D 8. What is output of the following code?
using System;
class Program
{
static void Main()
{
Display<System.Int32>(2010);
}
static void Display<T>(T v1)
{
[Link]([Link]());
}
}
A. Compile error
B. Runtime error
C. v1
D. 2010
A 9. Which sentence about value types is correct?
A. In [Link]
C. In [Link]
D. In [Link]
A 11. Why does the data not display using the following code?
[Link]();
studentCommand = [Link]();
[Link] = [Link];
[Link] = "SELECT * FROM Student";
studentAdapter = new SqlDataAdapter (studentCommand);
studentSet = new DataSet();
[Link] ("Text", studentSet, "FirstName");
A Event
B. Delegate
C. AsyncCaIIback
D. IAsyncResult
B 13. The ____ method of the ____ object is used to retrieve the data in the form fields
submitted by the user.
A Text
B. Label
C. LinkLabel
D. TextBox
B 18. What is output of the following code?
(see picture)
D. Nothing
A 19. What is output of the following code?
using System;
using [Link];
class Program
{
static void Main()
{
SqlCommand cmd = new SqlCommand();
[Link]([Link]);
}
}
A. There is no output
B. Runtime error
C. CommandText
D. Compile error
C 21. Which the following sentence about Delegate is true?
A. False
B. True
C 26. Which control combines the features of the TextBox and the ListBox controls?
A StatusBar
B. Label
C. ComboBox
D. TooIBar
C 28. Which property of Form allows to set the button on me Form that is clicked when
user press the Enter key?
A. DefaultButton
B. OKButton
C. AcceptButton
D. EnterButton
A 29. What is UDDI?
A. Solution View
B. Resource View
C. Class View
D. Properties View
A 32. Which sentence about BufferedStream is correct?
A. BufferedStream provides temporary storage for a stream of bytes that may be committed to
storage at a later time.
B. BufferedStream allows for random file access with data represented as a stream of bytes.
C. BuiferedStream provides random access to streamed data stored in memory rather than a
physical file.
A. Session
B. Application
C. ViewState
D. Cookie
B 36. Which control is a kind of selection list controls?
A Label
B. ComboBox
C. Button
D. TextBox
C 37. Assume that BaseCIass is a class; IFace1 and IFace2 is interface. Which ofthe
following declarations is INVALID?
A. No
B. Yes
A 42. You are building a C# application. Your application has two assemblies: [Link]
and [Link].
The assembly [Link] has 2 classes: Rectangle and Circle.
You want the Circle class can access all methods of the Rectangle class.
However. you do not want any classes inside [Link] to access methods of Rectangle class.
Which of the following access modifiers will you use for all methods inside the assembly
[Link]?
A. internal
B. sealed
C. public
D. private
C 43. A class can have ____
A Components
B. Controls
C. Core infrastructure
A. Background threads
B. Foreground threads
C 47. Which member of [Link] namespace is an enumeration?
A ThreadPool
B. ThreadStart
C. ThreadPriority
D. Thread
C 48. What is name of templates that wrap a block of selected statements within a relevant
scope?
A Console Application
B. Snippets
C. Surround With
D. Class Library
A 49. What is the standard format of a .NET assembly's version number?
A. <major>,<minor>,<build>,<revision>
B. <major>,<minor>,<revision>
C. <major>,<minor>,<revision>,<build>
D. <major>,<build>,<minor>,<revision>
B 50. Which property of the Exception class specifies textual information that indicates the
reason for the error and provides possible resolutions?
A lnnerException
B. Message
C. Source
D. StackTrace
C 1. What is output of the following code?
[Link]([Link]());
A. Compile error
D. Runtime error
A 2. Which variables can use only by one user but in all pages?
A. Session
B. Cookie
C. Application
D. ViewState
C 3. Which property of Control type is used to set a widget should be attached to which side
(or sides) of a Form?
A. Top
B. Anchor
C. Dock
D. Left
D 4. The _____ method of the _____ object is used to redirect the user to another page
A. Redirect, Request
B. [Link], Request
C. [Link], Request
D. Redirect, Response
C 5. Which element of a .NET assembly defines numerous flags that enable the runtime to
understand the layout of the managed file?
B. Type metadata
D. CIL code
B Hinh anh cau 6 De 1
6. Which is the most suitable statement to fill the missing code (line 12), if you want to build an
in-house XML Web service?
A. [WebServiceBinding(ConformsTo =
WsiProfiIes.BasicProfiIe1_1, EmitConformanceClaims = false)]
C. [WebServiceBinding(ConformsTo = WsiProfiIes.BasicProfiIe1_1,
EmitConformanceClaims = true)]
D. [WebServiceBinding(ConformsTo = WsiProfiIes.BasicProfiIe1_1)]
D 7. Which sentence about Application variables is correct?
A. DefauItButton
B. AcceptButton
C. OKButton
D. EnterButton
C 9. Suppose we have multi-file assembly as follows: [Link], [Link],
[Link]|e, [Link].
Which file is the manifest information located in?
A. In [Link]
C. In [Link]
D. In [Link]
D 10. What can be parameter modifiers of a given method?
B. params only.
C. public and private.
B. Structures
C. Delegates
using System;
class Program
{
delegate void Display();
static void Main()
{
Display d1 = new Display(DisplayHello);
d1();
}
static void DisplayHeIIo()
{
[Link]("HeIIo");
}
}
B. Runtime error
D. Hello
A 13. We can use ____ and ____ methods to ensure that application-level variables are not
updated by more than one user simultaneously.
A. The code will not compile successfully because the value of a constant variable needs to be
known at the compile time.
C. The code will not compile successfully because MyCIass instance cannot access its internal
member.
D. The code will not compile successfully because myCIass is a constant variable and you
cannot change value of a constant variable.
C 15. Which of the following statements is true?
A. attribute
B. encapsulation
C. interface
D. delegate
B 17. What of the followings is correct if we want to set the AChiId form as a child form of
the parent form named TheParent?
A. [Link] = TheParent;
B. [Link] = TheParent;
C. [Link] = true;
D. [Link] = AChiId;
E. [Link] = true;
C 18. The _____ event of the Form control is used to perform tasks such as allocating
resources used by the form.
A. Activated
B. Allocate
C. Load
D. Activate
B 19. Which of the following information is NOT included in a strong name of a .NET
assembly?
C. The Select command interacts with only a single table, the single table has been attributed
with a primary key, and the column(s) representing the primary key is accounted for in your SQL
Select statement.
D. The Select command interacts with only a single table and the single table has been attributed
with a primary key.
B 21. Override method ____
A. Is based on HTML.
B. Is executed by client.
A. Label
B. ListBox
C. TextBox
D. ComboBox
A 24. In which case we should use of Client-Side scripting?
A. Snippets
B. Surround With
C. Console Application
D. Class Library
B 26. How many interfaces a class can implement?
A. Only one.
B. Many.
B. By setting the expiry date of the cookie to a later time (like 10 years later.)
D 28. Which type of the [Link] namespace can be used to resolve the issue of
concurrency?
A. ThreadPooI
B. Thread
C. Monitor
D. Timer
B 29. By default, can we delete a folder that contains subdirectories and files?
A. Yes
B. No
B 30. ____ are the visual effects supported in Windows Forms applications.
A. Yes
B. No
B 32. What is the first step to define an event?
B. Define a delegate that contains the method to be called when the event is fired.
A. Null
B. 10
C. A null reference exception would be thrown unless myArray[1] is first initialized to a value
D. 0
B 34. Choose one correct statement about Server-side codes.
A. Server side code is executed on the browser.
B. Server side code is executed at the server side on IIS in [Link] framework.
D 35. What is CTS?
A. CTS is a language that sits above any particular platform-specific instruction set.
B. CTS is a set of rules provided to ensure that products of compilers will work properly in NET
environment.
D. CTS is a formal specification that documents how types must be defined in order to be hosted
by the CLR.
A 36. Which sentence about background threads is correct?
A. Background threads are viewed by the CLR as expendable paths of execution that can be
ignored at any point in time.
B. By default, every thread that is created via the [Link]() method is automatically a
background thread.
D. Background threads have the ability to prevent the current application from terminating.
C 37. What is the TrackBar control?
A. The TrackBar control allows user to choose an item from a range of possible selections, using
a pair of small up and down arrows.
C. The TrackBar control allows user to select a value from a range ( of values), using scroll bar-
like input mechanism.
D. The TrackBar control allows user to select a range of dates using a friendly UI.
C 38. What is output of this code?
class Student
{
string studentNo;
}
class Program
{
static void Main()
{
Students = new Student();
[Link] = "01234";
[Link]([Link]);
}
}
A. 01234
B. Nothing
C. Compile error
D. Runtime error
D 39. What is output of this code?
class Class1
{
private string name = ".NET Technology";
public string yourName
{
get { return name;}
set { name = value;}
}
public virtual void SayHeIlo()
{
[Link]("Hello {0}", [Link]);
}
}
class CIass2 : Class1
{
public Class2(string yourName)
{
[Link] = yourName;
}
public override void SayHeIlo()
{
[Link]();
}
}
class Program
{
static void Main(string[] args)
{
CIass2 obj = new Class2("Visual C#");
[Link]();
}
}
A. Hello Visual C# and .NET Technology
C. Compile error
D. Hello Visual C#
D 40. A (n) ____ type, can be used only by the assembly in which it is defined.
A. public
B. seal
C. private
D. internal
A 41. Which sentence is correct?
B. CLR does not compile the associated CIL into platform-specific instructions.
B. C#
C. MSIL
D. Java#
A 45. Which of the following associations of try, catch and finally is INVALID?
A. catch {} finally {}
B. try {} catch {}
C. try {} finally {}
A. manifest.
B. assembly.
C. meta-data.
A. CheckBox
B. ListBox
C. CheckedListBox
D. Button
B 48. Which of the following are the correct ways to declare a delegate for calling the
function func() defined in the sample class given below?
class Sample
{
public int func(int i, Single j)
{
/*Add code here.*/
}
}
A. DataSet
B. DataMember
C. DataSender
D. DataSource
E. DataSrc
C 1. Which building block is a formal specification that describes how types must be
defined in order to be hosted by CLR?
A. CLR
C. CTS
D. CLS
C 2. What is default value of AutoPostBack property?
A. true
B. 1
C. false
D. 0
C 3. What is a "type" in the world of .NET? (Choose the most correct answer)
A Type is a generic term used to refer to a member from the set {class, structure, interface}.
B. Type is a generic term used to refer to a member from the set {class, structure}.
C. Type is a generic term used to refer to a member from the set {class, structure, interface,
enumeration, delegation}.
D. Type is a generic term used to refer to a member from the set {class, structure, interface,
enumeration}.
A 5. Which property of form to get or set the button control that will be clicked when the
user presses the Esc key?
[Link]
B. EscButton
C. AbortButton
D. AcceptButton
D 6. Given the following code segment what will the value returned from the method be?
A 42
C. 491
D. 504
B 7. What is output of this code?
DateTime dt = DateTì[Link]("10/10/2009");
[Link]ỉteLine([Link](22).ToString("dd/MM/yyyy");
A 31/10/2009
B. 01/11/2009
C. Compile error
D. 11/1/2009
E 1/11/2009
F. 11/01/2009
B 8. Which Windows Forms control can be used to get characters from keyboard?
A. Label
B. ComboBox
C. CheckBox
D. ListBox
A 9. What is output of the following code?
using System;
using [Link];
using [Link];
class Program
{
static void Main()
{
SqlConnection cn = new SqlConnection();
[Link]();
[Link]([Link]());
}
}
A Runtime error
B. Open
C. Compile error
D. Closed
D 10. Boxing is ____
A. explicitly static
B. explicitly internal
C. implicitly internal
D. implicity static
C 12. Does "return 10 as long" compile?
B. Yes
A. BufferedStream provide a temporary storage for a stream of bytes that may be committed to
storage at a later time
C. BufferedStream provides random access to streamed data stored in memory rather than a
physical file.
D. BufferedStream allows for random file access with data represented as a stream of bytes.
B 15. What are required services in an [Link] Web server?
using System;
class Program
{
static void Main()
{
Display<System.Int32>();
}
static void Display<T>()
{
[Link](typeof(T).ToString());
}
}
A. ToString()
B. System.Int32
C. Compile error
D. Runtime error
C 20. How many [Link] files an [Link] application can have?
B. Only 1.
C. Single-file assemblies do not contain all the necessary CIL, metadata, and associated manifest
in an autonomous, single, well-defined package.
A. System exceptions are custom exceptions that derive from the [Link] type.
B. The exact location of cookie files does not dependent on which browser is using.
A. No
B. Yes
C 26. Validity of a page can be checked using the _______ property.
A ValidateControl
B. IsValidControl
C. IsValid
D. ControlToValidate
C 27. Which method is fired lastly during the page load?
A. Init()
B. Load()
C. Unload()
D. PreRender()
A 28. Which sentence about properties is correct?
A. Override method and overridden base method have to have the same return type.
C. Override method and overridden base method don't have the same declared accessibility.
A. Closed
B. Deleted
C. Destroyed
D. Disposed
C 31. Which keyword is used when you wish to explicitly reference the fields and members
of the current object?
A. abstract
B. base
C. this
D. virtual
D 32. Which one in the below events is fired secondly during the page load?
A. PreRender()
B. Init()
C. Unload()
D. Load()
B 33. Which sentence about WSDL is correct?
A. 3
B. 2
C. 1
D. 4
C 35. Which property of TextBox control in Windows Forms application is used to create
password input box?
A. Multiline
B. ReadOnly
C. PasswordChar
D. Text
B 36. What is name of software product that host web applications?
A. Web application
B. Web server
C. Exchange server
D. FTP server
C 37. You are building a C# application. Your application has two assemblies: [Link]
and [Link].
Which of the following access modifiers will you use for all methods inside the assembly
[Link]?
A. private
B. public
C. internal
D. sealed
C 38. Which sentence about Application variables is correct?
A. Byte code
B. Hex dump
D. IL
D 42. In Visual Studio .NET 2008, ____ utility presents a logical view of our work using an
Explorer-like view of the classes, methods and properties.
A. Properties View
B. Solution View
C. Resource View
D. Class View
D 43. Which class is at the top of .NET class hierarchy?
A. System.Int32
B. [Link]
C. [Link]
D. [Link]
B 44. You need to get access to a Microsoft Excel 2003 file. Which data adapter would you
use?
A. ODBCDataAdapter
B. OleDbDataAdapter
C. SqlDataAdapter
D. OleDataAdapter
B 45. Does Microsoft supply data provider for Oracle database?
A. No
B. Yes
C 46. What is NOT a type in the world of .NET?
A. Interface
B. Struct
C. Variable
D. Class
C 47. What is state of a thread after creating a Thread object?
A. Started
B. Stopped
C. Unstarted
D. Running
A 49. A C# class can be inherited from multiple interfaces?
A. Yes
B. No
C 50. What of the followings is correct for creating a command object with the connection
con?