Friday, November 15, 2013

ASP .Net 3.5 C# MCQ



With which class is the task of mapping a specific point in time into units, such as weeks, months, and years accomplished?
a.    System.DateTime
b.    System.TimeSpan
c.    System.Globalization.Calendar
d.    System.Globalization.CultureInfo
Answer: Answer is c
Further Reading:
A calendar divides time into units, such as weeks, months, and years. The number, length, and start of the divisions vary in each calendar. Useful resources, Calendar class
Which of the following are true regarding the System.Collections.Generic.HashSet 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.
d.    All of the above
Answer: Answer is d
Further Reading:
A HashSet collection is not sorted and cannot contain duplicate elements.Useful resources, HashSet collection, HashSet
Which of the following is/are true regarding the use of Authentication to control access to the HTML file (.htm .html) ?
a.    ASP.NET authentication cannot be used to control access.
b.    ASP.NET authentication handles these by default in a manner equivalent to .aspx pages.
c.    The extension can be associated with aspnet_isapi.dll in IIS for the appropriate directory.
d.    A custom HTTP Request processor must be installed to examine the URL's and determine the appropriate access rights.
Answer: Answer is c
Further Reading:


Which of the following attributes of the ProcessModel element of the Machine.Config file, is used to specify the level of authentication for DCOM security?
a.    comAuthenticationLevel
b.    comImpersonationLevel
c.    maxIoThreads
d.    requestQueueLimit
Answer: Answer is a


In which of the following events, the final changes to the contents of the page or its controls could be made?
a.    Load
b.    LoadComplete
c.    PreRender
d.    Init
Answer: Answer is c
Further Reading:
The PreRender event occurs for each control on the page. Use the event to make final changes to the contents of the page or its controls. Useful resources, ASP.NET Page Life Cycle Overview


Which of the following is applicable when using Secure Socket Level communications?
a.    A certificate must be installed on the server.
b.    The certificate must mach 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.
Answer: Answer is d
Further Reading:
Useful resources, SSL Certificates


Which of the following are true about Nullable types?
a.    A Nullable type is a reference type.
b.    An implicit conversion exists from any non-nullable value type to a nullable form of that type.
c.    A predefined conversion from the nullable type S? to the nullable type T? exists if there is a predefined conversion from the non-nullable type S to the non-nullable type T
Answer: Answer is b, c
Further Reading:
Useful resources, Nullable Types


In order to use the AJAX AuthenticationService class, which of the following must be true?
a.    It must be enabled in the web.config of the ASP.Net application.
b.    Forms Authentication must be enabled in the web.config of the ASP.Net Application.
c.    Cookies must be enabled in the browser.
d.    A redirection url must be supplied for successful login.
Answer: Answer is a, b, c
Further Reading:
Which directive allows the utilization of a custom web control in an ASP.NET page?
a.        @Register
b.    @Include
c.    @Control
d.    @Import
Answer: Answer is a
Further Reading:
The @ Register directive declares the control's tag prefix and the location of the control's assembly. You must use this directive if you want to add user controls or custom ASP.NET controls to a page. Useful resources,ASP.NET Web Page Syntax


Which of the following is false about System.GC under version 3.5 of the .NET Framework?
a.    You can request that the garbage collector processes a generation if it determines that it is appropriate at specific points in your code    
b.    You can control the intrusiveness of the garbage collector (how often it performs collections) while your program is running    
c.    You can control the intrusiveness of the garbage collector (how often it performs collections) only during application initialization
d.    You should specify LowLatency when using Concurrent Server Garbage Collection to improve memory utilization
Answer: Answer is c
Further Reading:
Useful resources, GC Class, Latency Modes
Where should an instance of an object which provides services to all users be stored?
a.    ApplicationState
b.    SessionState
c.    ViewState
d.    None of the above
Answer: Answer is a
Further Reading:
Application state is a data repository available to all classes in an ASP.NET application. Application state is stored in memory on the server and is faster than storing and retrieving information in a database. Unlike session state, which is specific to a single user session, application state applies to all users and sessions. Useful resources, ASP.NET Application State


Which of the following can be used to control caching within an asp.net application
a.    Using the @OutputCache directive in the .aspx file.
b.    Setting the HttpCacheProlicy of the Cache property inside the Response object.
c.    Using the Cache property of the Page Object
d.    All of the above.
Answer: Answer is d
Further Reading:
Useful resources, ASP.NET Caching
Via which of the following is ViewState maintained by default
a.    A hidden variable within the page that is included with each round tip.
b.    A cookie which resides on the client’s computer
c.    A sever side in-process memory cache
d.    Instance member variable of the Page class
Answer: Answer is a
Further Reading:
The view state of a page is, by default, placed in a hidden form field named __VIEWSTATE. Useful resources, Understanding ASP.NET View State


When using an automatic property, which of the following statements is true?
a.    The compiler generates a backing field that is completely inaccessible from the application code.
b.   
The compiler generates a backing field that is accessible via reflection.
c.    The compiler generates a code that will store the information separately from the instance to ensure its security.
Answer: Answer is a
Further Reading:
In general, you can’t accessBut there might be different stories. According to the accepted answer of Is it possible to access backing fields behind auto-implemented propertiesyou can do it, but is not confirmed nor provided any reference. So, as of now, our answer is The compiler generates a backing field that is completely inaccessible from the application code. Useful resources,Auto-Implemented Properties
To which of the following do automatic properties refer?
a.    You declare (explicitly or implicitly) the accessibility of the property and get and set assessors, but do not provide any implementation or backing field
b.    You attribute a member field so that the compiler will generate get and set assessors
c.    The compiler creates properties for your class based on class level attributes
d.    They are properties which are automatically invoked as part of the object construction process
Answer: Answer is a
Further Reading:
Useful resources, Auto-Implemented Properties


Which of the following can be used to preserve application state information?
a.    ApplicationState
b.    SessionState
c.    ViewState
d.    All of the above
Answer: Answer is d
Further Reading:
Useful resources, ASP.NET State Management


The rights of which Windows Account does anonymous Web Site Access use by default?
a.    Administrator
b.    IUSER_MachineName (where ther MachineName is the actual computer name)
c.    ASPNET
d.    Guest
Answer: Answer is b
Further Reading:
In IIS 6.0, anonymous users are assigned by default to the IUSR_computername account, which is a valid Windows account that is a member of the Guests group. The IUSR_computername account can be defined on a computer or on a domain. Also note that, in IIS 6.0, the IUSR_COMPUTERNAME account has been denied write access to Web content by default. Useful resources,   Allowing Anonymous Access to Web Sites (IIS 6.0)


Which of the following types guarantee atomic reads and writes?
a.    int
b.    double
c.    long
d.    float
Answer: Answer is a, d
Further Reading:
Reads and writes of the following data types are atomic: bool, char, byte, sbyte, short, ushort, uint, int, float, and reference types. In addition, reads and writes of enum types with an underlying type in the previous list are also atomic. Reads and writes of other types, including long, ulong, double, and decimal, as well as user-defined types, are not guaranteed to be atomic. Useful resources, Atomicity of variable references


Which of the following statements are applicable in LINQ to SQL?
a.    It is pure Object Relational (O/R) model.
b.    It is a set of enhancements to the DataSet and DataTable classes.
c.    It requires the use of SQLServer as the database.
d.    Because LINQ is based on Queries, it cannot be used to modify the data in the database
Answer: Answer is a
Further Reading:


The following are the two statements regarding the DataRow from the DataRowCollection of a DataTable?
Statement X: Use the DataRowCollection.Remove method to immediately delete the row.
Statement Y: Use the DataRow.Delete method to mark the row for deletion when DataRow.AcceptChanges is called.
a.    Statement X is correct and Statement Y is incorrect
b.    Statement X is incorrect and Statement Y is correct
c.    Both Statements X, Y are correct
d.    Both Statements X, Y are incorrect
Answer: Answer is c
Further Reading:
DataRow.Delete delete the row immediately. Useful resources, DataRow , DataRowCollection
Which of the following are required to be true by objects which are going to be used as keys in a System.Collections.HashTable?
a.    They must handle case-sensitivity identically in both the GetHashCode() and Equals() methods.
b.    Key objects must be immutable for the duration they are used within 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 IEqualityComparer 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
Answer: Answer is e
Further Reading:
Useful resources, Hashtable


Which of the following are true about Extension Methods?
a.    They can be declared either static or instance members.
b.    Extension methods can be used to override existing instance methods
c.    Extension methods with the same signature for the same class may be declared in multiple namespace without causing compilation errors.
d.    They must be declared in the same assembley(but may be in different source files)
Answer: Answer is c
Further Reading:
Extension methods are defined as static methods but are called by using instance method syntax. Their first parameter specifies which type the method operates on, and the parameter is preceded by the this modifier. Extension methods are only in scope when you explicitly import the namespace into your source code with a using directive. Useful resources, Extension Methods


Which of the following is/are true regarding validation in an ASP.NET application?
a.    Server validation can be used alongside with the client side validation
b.    All Data Posted on server, should be validated
c.    Client side validation typically provide faster response (Feedback) then server validation.
d.    All of the above
Answer: Answer is d
Further Reading:
Useful resources, ASP.NET Validation


Which of the following are included in the advantages of Lambda Expressions over Anonymous methods?
a.    More concise syntax
b.    The types for a Lambda Excpression may be omitted
c.    The body of an Anonymous method can not be an expression.
d.    Lambda Expressions permit deferred type inference that anonymous methods do not.
e.    All of the above.
Answer: Answer is a
Further Reading:


In order to enable AJAX functionality, which control is placed on the page?
a.    asp:ScriptManager
b.    asp:AjaxManager
c.    asp:PageManager
d.    asp:ClientScriptManager
Answer: Answer is a
Further Reading:
Useful resources, ScriptManager


The earliest event in which all viewstate information has been restored is?
a.    Init
b.    PreLoad
c.    Load
d.    Render
Answer: Answer is b
Further Reading:
The viewstate is loaded between the init and the load event. So this also means that if you want to access the property values of a web control after a postback you have to do this after the viewstate has been restored and you can not do this in the page_init event rather it should be done in or after Page_Load event handler. For Useful resources, Understanding ASP.NET View State


Which of the following differentiates a UserControl from a Custom Server control?
a.    UserControl can directly express rendering information via markup; a Custom Server control can’t.
b.    UserControl does not require the use of the @Register directive; a Custom Server control does require it.
c.    UserControl can make use of script based validation;  a Custom Server control can not.
d.    UserControl can represent complete compositate hierarchy; a Custom Server control can not.
Answer: Answer is d
Further Reading:


Which of the following accurately describes the class structure when implementing an ASP.Net page which uses the CodeFile attribute?
a.    The actual instantiated class is dynamically created and has a base class defined in the CodeFile.
b.    The actual instantiated class is dynamically created and has a member representing the class defined in the CodeFile.
c.    The actual instantiated class is dynamically created and is a co-class of the class defined in the CodeFile.
Answer: Answer is c
Further Reading:
Useful resources, ASP.NET Web Page Code Model


What is the proper declaration of a method which will handle the following event?
Class MyClass
{
     public event EventHandler MyEvent;
}
a.  public void A_MyEvent(object sender, MyArgs e)
b.  {
c.  }
d.     
e.  public void A_MyEvent(object sender, EventArgs e)
f.  {
g.  }
h.  public void A_MyEvent(MyArgs e)
i.  {
j.  }
Answer: Answer is a
Further Reading:
Useful resources, Event handler methods


Given the code below, which items will cause a compilation error?
static void F1(params int [] y)
{
}

static void Sample()
{

int [] j = new Int32[3];
List k = new List();
// FURTHER READING GOES HERE
}
a.    F1(j);
b.    F1(k);
c.    F1(1, 2, 3);
d.    F1(new [] {1,2,3})
Answer: Answer is b
Further Reading:
F1() expects integer type parameter but k is a list type object. So, F1(k) will generate compile time error.
By which of the following can the .NET class methods be included in .aspx files?
a.    Including .Net code within the script element with the runat attribute set to server
b.    Including .Net code within the code element
c.    Including .Net code using the @code directive on the page
d.    Including .Net code within the execute attribute of the individual control
Answer: Answer is a


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.
d.    None of the above
Answer: Answer is d
Further Reading:
“Suite B”, CNG and System.Security.Cryptography.AesManaged not available under .net 3.5Also, Cryptography API Next Generation(CNG) is available from Windows Vista™and onward.Useful resources,CryptographyAesManagedclass


Custom non-fatal exceptions should be derived from?
a.    ApplicationException
b.    DataMisalignedException
c.    ExecutionEngineException
d.    SystemException
Answer: Answer is a
Further Reading:
The exception that is thrown when a non-fatal application error occurs. Useful resources,ApplicationException


Which of the following are the goals of the Windows Communication Foundation?
a.    Bringing various existing communication technologies into a unified environment.
b.    Cross vendor/platform communication.
c.    Support for asynchronous communications.
d.    Support for distributed applications based on technologies such as MSMQ and/or COM+
e.    All of the above
Answer: Answer is e
Further Reading:
Useful resources, What is WCF, WCF


When using a DataReader to access the results of a Database operation, which of the following is true?
a.    The DataReader provides a cursor that can be used to move forward and backwards through the result.
b.    The DataReader provides random access capabilities on the result.
c.    The DataReader can provide the Schema information of the result to the application code.
Answer: Answer is c
Further Reading:


Which of the following does Event Bubbling allow composite controls to perform?
a.    Propagate container related events to the child controls.
b.    Propagate child events up to control hierarchy
c.    Distribute events between peer child controls.
d.    Translate control unhandled control events into exceptions.
Answer: Answer is b
Further Reading:
The ASP.NET page framework provides a technique called event bubbling that allows a child control to propagate events up its containment hierarchy. Useful resources, Event Bubbling


With which of the following are Declarative Databinding expressions delimited?
a.    <%#    %>
b.    <%--   --%>
c.    <--   -->
d.    <#  >
Answer: Answer is a
Further Reading:
ASP.NET introduces a new declarative syntax, <%# %>. This syntax is the basis for using data binding in an .aspx page. All data binding expressions must be contained within these characters.Useful resources,ASP.NET data binding


Which of the following is used to remove a cookie from a client machine?
a.    Remove the cookie from the System.Web.UI.Page.Request.Cookies collection.
b.    Remove the cookie from the System.Web.UI.Page.Request.Browser.Cookies collection.
c.    Set the Expires property to DataTime.Now for a cookie in the Web.UI.Page.Response.Cookies
d.    Remove the cookie from the System.Web.UI.Page.Response.Cookies collection.
Answer: Answer is c
Further Reading:
You cannot directly delete a cookie on a user's computer. However, you can direct the user's browser to delete the cookie by setting the cookie's expiration date to a past date. The next time a user makes a request to a page within the domain or path that set the cookie, the browser will determine that the cookie has expired and remove it. Useful resources, How to: Delete a Cookie


Which of the following are true of using ADO.NET DataSets and DataTables?
a.    The DataSets and DataTables objects requires continuous connection to the database
b.    All tables in a dataset must come from the same database
c.    A given instance of a DataTable can be in only one DataSet
d.    Content from multiple DataSets can easily be combined into a single DataSet that contains the net result of all changes
Answer: Answer is d
Further Reading:



The following are two statements related to System.DateTimeOffset namespace?
Statement X: DateTimeOffset values can be converted to DateTime values and vice versa.
Statement Y: DateTimeOffset does not supports arithmetical operations
a.    Statement X is incorrect and Statement Y is correct
b.    Statement X is correct and Statement Y is incorrect
c.    Both Statements X, Y are correct
d.    Both Statements X, Y are incorrect
Answer: Answer is b
Further Reading:
Useful resourcesDateTimeOffsetStructure
To which contract is the SessionMode property to disallow, require, or permit applied when Windows Communication Foundation is used?
a.    ServiceContract
b.    OperationContract
c.    DataContract
d.    MessageContract
Answer: Answer is a
Further Reading:


Which of the following are true regarding System.Web.Mail and System.Net.Mail namespaces?
a.    System.Web.Mail is not supported under version 3.5 of the Framework
b.    System.Web.Mail is deprecated under version 3.5 of the Framework, and it is officially recommended that System.Net.Mail be used.
c.    System.Web.Mail is the preferred solution when using IIS hosted applications.
d.    There are no functional differences; the items were moved to a new namespace to better reflect their applicability
Answer: Answer is b
Further Reading:
Useful resources, System.Net.Mail ,System.Web.Mail


In which file are Predefined Client Side Validation Scripts defined?
a.    WebUIValidation.js
b.    ClientValidation.js
c.    AspNetValidation.js
d.    USerValidation.js
Answer: Answer is a
Further Reading:
By default, Client side validation are defined in a script library called WebUIValidation.js. Useful resources, ASP.NET Validation


Which of the following items are recommended when using XML comments to generate documentation?
a.    <exception>
b.    <code>
c.    <summary>
d.    All of them
Answer: Answer is d
Further Reading:


Which of the following are common methods of supplying "Help" information to an ASP.NET application?
a.    Setting the ToolTip property of a control to a string containing the information.
b.    using the open method of the browser window object to open a new browser window and display a help related ASP.NET page.
c.    Using the showHelp method of the browser window object to display a topic from a compiled help file (.chm).
d.    All of the above
Answer: Answer is c


When using Cascading Style Sheets (CSS) to format output, which of the following is/are true?
a.    Styles can be applied to all elements having the same CSS Class attribute.
b.    Styles can be applied to specific elements based on their ID attribute.
c.    Styles can be applied to elements based on their position in a hierarchy.
d.    Styles can be used to invoke script based code.
e.    All of the above.
Answer: Answer is e
Further Reading:
Useful resources, CSS Overview


Which of the following is false regarding System.Threading.ReaderWriterLockSlim?
a.    It is optimized for single processor/core operations.
b.    A thread which has a read lock on a resource may not acquire a write lock on the same resource.
c.    By default, a thread which has a read lock on a resource and attempts to get another read lock on the same resource will throw an exception
Answer: Answer is a
Further Reading:
Useful resources, ReaderWriterLockSlim Class


Which of the following conditions can trigger the automatic recycling of an ASP.NET application hosted in IIS?
a.    A specific number of requests to the application process.
b.    A percentage of physical memory utilized by the process.
c.    A specific time interval.
d.    A specific date and time.
e.    All of the above
Answer: Answer is a, c, d
Further Reading:


Which of the following is not a characteristic, that a Query expression should have?
a.    It must contain a from clause.
b.    It must begin with a select clause.
c.    It can end with a group clause
Answer: Answer is b, c
Further Reading:
A query expression is a query expressed in query syntax. A query expression is a first-class language construct. It is just like any other expression and can be used in any context in which a C# expression is valid. A query expression consists of a set of clauses written in a declarative syntax similar to SQL or XQuery. Each clause in turn contains one or more C# expressions, and these expressions may themselves be either a query expression or contain a query expression.


When using asynchronous partial updates with an UpdatePanel, which of the following are true?
a.    Only the UpdatePanel and any child controls go through the server lifecycle.
b.    The entire page always goes through the entire lifecycle.
c.    Only the UpdatePanel which initiated the Postback and its child controls can provide updated information.
d.    UpdatePanels can not be used with Master Pages.
e.    TreeView,Menu,Substitution and Validatio controlscan not be used within and UpdatePanel
Answer: Answer is a
Further Reading:
Useful resources, UpdatePane
Which of the following statements is false about Passport Authentication?
a.    The Passport SDK must be installed.
b.    Passport authentication requires a network path between the Client and the Microsoft Passport Server.
c.    Passport Authentication provides persistent authentication across sessions
Answer: Answer is b
Further Reading:


The default number of threads per processor in the System.Threading.ThreadPool class under version 3.5 of the Framwork is?
a.    1
b.    25
c.    250
d.    100
e.    500
Answer: Answer is b
Further Reading:
There is one thread pool per process.You can set the upper limit of threads that the pool will create by calling Thread.Pool.SetMaxThreads, the defaults are,
25 per core in 2.0
250 per core in 3.5
1023 in 4.0 32 bit
32768 in 4.0 64 bit.
Useful resources, ThreadPool


Which of the following statements do Expression Trees fit best?
a.    Expression trees are a data structure which can be initially composed using language syntax.
b.    Expression trees are a dynamically generated code which is executed to perform the desired function.
c.    Expression trees can be modified once they are created
Answer: Answer is a
Further Reading:
Useful resources,Expression Trees


when using an implicitly typed array ,which of the following is most appropriate?
a.    All elements in the initialize list must be of the same type.
b.    All elements in the initialize list must be implicitly convertible to a known type of at least one member in the initialize list.
c.    All elements in the initialize list must be implicitly convertible to common type which is a base type of the items actually in the list
d.    There are no restrictions on the items in the initializer list as the array is not declared to be a specific type
e.    None of the above
Answer: Answer is d
Further Reading:
Useful resources, Implicitly Typed Arrays


Which of the following are performed to fully debug an ASP.NET Application running on the same machine as the debugger?
a.    Enabling debug information in the .NET Assembly.
b.    Setting the debug attribute of the compilation element to true in the web.config file.
c.    Enabling ASP.NET debugging in the IIS metabase.
Answer: Answer is b
Further Reading:


Which of the following controls allows the use of XSL to transform XML content into formatted content?
a.    System.Web.UI.WebControls.Xml.
b.    System.Web.UI.WebControls.Xslt.
c.    System.Web.UI.WebControls.Substitution.
d.    System.Web.UI.WebControls.Transform
Answer: Answer is a
Further Reading:
Useful resources, Xml Class


Which of the following is not an unboxing conversion?
a.  void Sample1(object o)
b.  {
c.    int i = (int)o;
d.  }  
e.     
f.  void Sample1(ValueType vt)
g.  {
h.    int i = (int)vt;
i.  }  
j.       
k.  enum E { Hello, World} void Sample1(System.Enum et)
l.  {
m.    E e = (E) et;
n.  }  
o.     
p.  class C {
q.    public int Value { get; set; }
r.  }
s.  void Sample1(C vt)
t.  {
u.    int i = vt.Value;
v.  }
w.    
Answer: Answer is d
Further Reading:
Boxing is the process of converting a value type to the type object or to any interface type implemented by this value type. Unboxing extracts the value type from the object. Boxing is implicit; unboxing is explicit. In (d), it’s not followed the rules of unboxing. So, it’s not unboxing conversion. Useful resources, Boxing and Unboxing


Where should information about a control created at design time be stored?
a.    ApplicationState
b.    SessionState
c.    ViewState
d.    None of the above
Answer: Answer is d
Further Reading:
Information about a control created at design time stored in Script LibraryDesign-time controls are implemented using script stored in the Script Library. Do not alter the contents of the library, or the controls might not work properly. Useful resources, Creating Forms with Design-Time Controls


Determining the availability of sufficient memory for an application can be accomplished by?
a.    creating an instance of System.runtime.memoryFailpoint and monitoring for an insufficient memory Exception.
b.    Creating an instance of system.runtime.memoryFailpoint and monitoring for an out of memory Exception.
c.    There is no supported application level means determine if the specific amount of memory is available
d.    Using static methods of System.Runtime.MemoryFailPoint and checking the return value
Answer: Answer is a
Further Reading:
Useful resources, MemoryFailPoint Class


The output generated by the following code will be?
string t = @"This\Is\a\Test";
Response.Write(t);
a.    ThisIsaTest
b.    This\Is\a\Test
c.    It will give a compilation error: Unrecognized escape sequence
Answer: Answer is b
Further Reading:
Useful resources, String literals
Which of the following events should be used for assigning a Theme dynamically to a page?
a.    PreInit
b.    Init
c.    PreLoad
d.    PreRender
e.    Render
Answer: Answer is a
Further Reading:
In a handler for the page's PreInit method, set the page's Theme property. Useful resources, Apply ASP.NET Themes Programmatically


Which of the following is true about C# generics?
a.    C# allows non-type templateparameters.
b.    C# supports explicit specialization.
c.    C# allows the type parameter to be used as the base class for generic type.
d.    C# allows a generic type parameter itself to be a generic.
e.    C# enforces that all codes are valid for all types of parameters
Answer: Answer is e
Further Reading:
Useful resources,C# Generics


Determining the availability of sufficient memory for an operation can be accomplished by?
a.    Creating an instance of System.Runtime.MemoryFailPoint and monitoring for an InsufficientMemoryException
b.    Creating an instance of System.Runtime.MemoryFailPoint and monitoring for an OutOfMemoryException
c.    There is no supported application level means to determine if a specific amount of memory is available
Answer: Answer is a
Further Reading:
To use a memory gate, you must create a MemoryFailPoint object and specify the number of megabytes (MB) of memory that the next operation is expected to use. If enough memory is not available, anInsufficientMemoryException exception is thrown. Useful resources, MemoryFailPoint


When using an implicitly typed array, which of the following is most appropriate?
a.    All elements in the initializer list must be of the same type.
b.    All elements in the initializer list must be implicitly convertible to a known type which is the actual type of at least one member in the initializer list.
c.    ll elements in the initializer list must be implicitly convertible to common type which is a base type of the items actually in the list
Answer: Answer is b
Further Reading:
ou can create an implicitly-typed array in which the type of the array instance is inferred from the elements specified in the array initializer. Useful resources, Implicitly Typed Arrays


What will be the impact of using implicitly typed local variables as in the following example?
var sample = "Hello World";
a.    The actual type is determined at compilation time, and has no impact on the runtime
b.    The actual type is determined at runtime, and late binding takes effect.
c.    "var" itself is a specific type defined by the framework, and no special binding takes place
Answer: Answer is a
Further Reading:
It is important to understand that the var keyword does not mean "variant" and does not indicate that the variable is loosely typed, or late-bound. It just means that the compiler determines and assigns the most appropriate type. Useful resources, Implicitly Typed Local Variables


When using a JavaScript timer control in conjunction with UpdatePanels, which of the following statements are true
a.    The interval will never restart before the page postback is complete
b.    The timer control must be located outside of the UpdatePanel
c.    If the timer expiration triggers a postback while a previous postback is in progress, the first postback is canceled
d.    The timer must always be specified as a trigger for the updatepanel which is to be update when the interval expires
Answer: Answer is d
Further Reading:
When timer control inside an UpdatePanel Control, the JavaScript timing component is re-created only when each postback finishes. Therefore, the timed interval does not start until the page returns from the postback. But, if the timer controls is outside an UpdatePanel control, the JavaScript timing component continues to run as the postback is being processed. In this case, if a new postback is initiated while an earlier postback is being processed, the first postback is canceled. Useful resources, Timer Control


Which of the following does using Initializer Syntax with a collection as shown below require?
a.    Collection Class must implement System.Collections.Generic.ICollection<T>
b.    Collection Class must implement System.Collections.Generic.IList<T>
c.        Collection Class must implement System.Collections.Generic.ICollection<T>

or

   Each of the Items in the Initializer List will be passed to the Add(T item) method
Answer: Answer is c
Further Reading:
In order to work with Collection initializers, a class must implement IEnumerable (not generic) and it must have an .Add() method.The method does not have to be Add(T) - it will work with non-generic collections as well.  The objects in the initialization list must match a valid Add(arg) method on the collection class. Useful resources,collection classes, object and collection initializer


Which of the following can one use to detect the user's current language?
a.    Examining the UserLanguage property of current Request object.
b.    Examining the CurrentCulture property of the current Request object.
c.    Examining the Language property of the current Page object.
Answer: Answer is a
Further Reading:
Request.UserLanguages property returns the Web browser's current language as a string. Useful resources, CurrentCulture Property


When Windows Communication Foundation is used to develop a Web Service, which of the following are supported?
a.    WS-Addressing
b.    WS-MetadataExchange
c.    WS-Security
d.    WS-Atomic Transaction
e.    All of the above
Answer: Answer is e
Further Reading:
Useful resources, WCF