Sei sulla pagina 1di 7

Ques.

1
Which of the following is/are applicable while using Server Socket Level communications?
a. A certificate must be installed on the server.
b. The certificate must match the web address to prevent a browser warning or error.
c. The certificate must be issued by an authority recognized by the client computer to prevent a
browser warning or error.
d. All of the above.

The answer is: d. All of the above.

Ques.2
In which file are Predefined Client Side Validation Scripts defined?
a.
b.
c.
d.

WebUIValidation.js
ClientValidation.js
AspNetValidation.js
UserValidation.js

The answer in: b. ClientValidation.js

Ques.3
Which of the following are true regarding the System.Collections.Generic.HashSet<T> class?
a. HashSet is an unordered collection.
b. The default EqualityComparer checks whether the element supplied to the HashSet is unique
or not.
c. HashSet provides functionality for conceptual sets where the rules for membership can be
specified without actually creating all of the items.

The answer is: b. The default EqualityComparer checks whether the element
supplied to the HashSet is unique or not.

Ques.4
Which of the following are true about Extension methods.
a.
b.
c.
d.

They can be either declared either static or instance members.


They must be declared in the same assembly (but may be in different source files)
Extension methods can be used to override existing instance methods.
Extension methods with the same signature for the same class may be declared in multiple
namespaces without causing compilation errors.

The answer is: a. They can be either declared either static or instance
members.

Ques.5
Which of the following conditions can trigger the automatic recycling of an ASP.NET
application hosted in IIS?
a.
b.
c.
d.

A specific number of requests to the application process.


A percentage of physical memory utilized by the process.
A specific time interval
All of the above

The answer is: d. All of the above

Ques.6
Via which of the following is ViewState maintained by default?
a.
b.
c.
d.

A hidden variable within the page that is included with each round tip.
A cookie which resides on the clients computer.
A server side in-process memory cache.
Instance memory variables of the Page class.

The answer is: a. A hidden variable within the page that is included with each
round tip.

Ques.7
Which of the following are true about System.Security,Cryptography under version 3.5 of the
framework?
a. Support is provided for the Suite B set of cryptographic algorithms as specified by the
National Security Agency(NSA).
b. Cryptography Next Generation (CNG) classes are supported on XP and Vista systems.

c. The System.Security.Cryptography.AesManaged.class allows custom block size , iteration


counts and feedback modes to support any Rijndael based encryption.

The answer is: b. Cryptography Next Generation (CNG) classes are supported
on XP and Vista systems.

Ques.8
Which of the following are recqired to be true by objects which are going to be used as keys in
a System.Collections.HashTable?
a. They must handle case-senstivity identically in both the GetHashCode() and Equals() methods.
b. Key objects must be immutable for the duration they are usedwithin a HashTable.
c. Get HashCode() must be overridden to provide the same result, given the same parameters,
regardless of reference equality unless the HashTable constructor is provided with an
IEqalitycomparer parameter.
d. Each Element in a HashTable is stored as a Key/Value pair of the type
System.Collections.DictionaryElement
e. All of the above

The answer is: e. All of the above.

Ques.9
Which of the following can be used to control caching within an ASP.NET application?
a.
b.
c.
d.

Using the @OutputCache directive in the .aspx file.


Setting the HttpCachePolicy of the Cache property inside the Response object.
Using the Cache property of the Page object.
All of the above

The answer is: a. Using the @OutputCache directive in the .aspx file.

Ques.10
Which of the following are included in the advantages of Lambda Expressions over
Anonymous methods?
a.
b.
c.
d.
e.

More concise syntax


The types of a Lambda Expression may be omitted
The body of an anonymous method can not be an expression
Lambda Expressions permit deferred type inference, that anonymous methods do not
All of the above

The answer is: a. More concise syntax

Ques.11
Which of the following does using Initializer Syntax with a collections as shown below
require?

CollectionClass<int> numbers = new CollectionClass<int> {0,1,2,3,4,5,6,7,8,9};


a. Collection class must implement
System.Collections.Generic.ICollection<T>
b. Collection Class must implement
System.Collections.Generic.IList<T>
c. Each of the items in the Initializer List will be passed to the Add<T>(T item) method

The answer is: b. Collection Class must implement


System.Collections.Generic.IList<T> and c. Each of the items in the Initializer
List will be passed to the Add<T>(T item) method

Ques.12:
Which of the following are true about System.Security.Cryptography under version 3.5 of the
framework?

a. Support is provided for the "Suite B" set of cryptographic algorithms as specified by
the National Security Agency (NSA).
b. Cryptography Next Generation (CNG) classes are supported on XP and Vista systems.
c. The System.Security.Cryptography.AesManaged class allows custom block size,
iteration counts and feedback modes to support any Rijndael based encryption.

the answer is: b. Cryptography Next Generation (CNG) classes are


supported on XP and Vista systems.

Ques.13:
Which of the following types guarantee atomic reads and writes?

a.
b.
c.
d.

int
double
long
float

the answer is:

a. int and d. float

Ques.14:
Which of the following is false about declarative attributes?

a. They must be inherited from the System.Attribute.


b. Attribute classes may be restricted to be applied only to application element types.
c. By default, a given attribute may be applied multiple times to the
same application element.

the answer is. b. Attribute classes may be restricted to be applied only


to application element types.

Ques.15:

When deleting a data row from the data row collection of a data table,you can

a.Use the DataRowCollection.Remove method to immediately delete the row.


b. Use the DataRowCollection.Remove method to mark the row for deletion when
DataRow.AcceptChanges is called.
c. Use the DataRow.Delete method to immediately delete the row.
d. Use the DataRow.Delete method to mark the row for deletion when DataRowAcceptChanges
is called.

The answer is : (a). Use the DataRowCollection.Remove method to


immediately delete the row. And (d). Use the DataRow.Delete method to mark the
row for deletion when DataRowAcceptChanges is called.

Ques.16:

Which of the following is NOT a valid C# preprocessor directive?

a.
b.
c.
d.
e.

#define
#line
#include
#error
#pragma

the answer is: e: #pragma

Ques.17:
When developing a managed client to be used with an existing COM component.________
a. you should modify the COM component to enable CLR functionality.
b. you should use Tlblmp.exe to create a managed wrapper.
c. you should use TlbExp.exe to create a managed wrapper.
d. you should enable an unsafe code.

the answer is: a. you should modify the COM component to enable CLR
functionality.

Ques.18:

a.
b.
c.
d.
e.

Which of the following is true about C# generics?


C# allows non-type template parameters.
C# supports explicit specialization.
C# allows the type parameter to be used as the base class for generic type.
C# allows a generic type parameter itself to be a generic.
C# enforces that all codes are valid for all types of parameters.

The answer is: d. C# allows a generic type parameter itself to be a generic.

Ques.19
Which of the following are true about namespaces & assemblies?
a.
b.
c.
d.

A single assembly may contain multiple namespaces.


The same namespace may be used in multiple assemblies.
Namespaces may be aliased to provide a shorthand notation for a fully qualified identifier.
All of the above.

The answer is: d. All of the above.

Ques.20
Which of the following are valid as the underlying type for an enumeration?
a.
b.
c.
d.

Int
Sbyte
Long
All of the above

The answer is: a. Int

Ques.21
Elements in System.Collections.Specialized.OrderedDictionary are:
a. Sorted by Key
b. Sorted by element
c. Not sorted

The answer is: a: Sorted by key

Ques22.
Which of the following types are derived from System.Reflection.MemberInfo?
a. System.Reflection.PropertyInfo
b. System.Reflection.EventInfo

c. System.Type
d. System.Refection.InstanceInfo

The answer is: a. System.Refection.PropertyInfo


b. System.Refection.EventInfo

Ques23.
Which of the following is false about declarative attributes?
a. They must be inherited from the System Attribute.
b. Attribute classes may be restricted to be applied only to the application element types.
c. By default, a given attribute may be applied multiple times to the same application element.

The answer is: b. Attribute classes may be restricted to be applied only to the
application element types.

Ques.24
Custom non-fatal exceptions should be derived from:
a.
b.
c.
d.

ApplicationException
DataMisalignedException
ExecutionEngineException
SystemException

The answer is: a. ApplicationException

Potrebbero piacerti anche