1. Which of the following does using Initializer Syntax with a collection as shown below require?
CollectionClass<int> numbers = new CollectionClass<int> { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
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.
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Class MyClass
{
public event EventHandler<MyArgs> MyEvent;
}
Answers:
Answers:
Answers:
Answers:
Answers:
string t = @”ThisIsaTest”;
Response.Write(t);
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
var sample = “Hello World”;
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Statement X: DateTimeOffset values can be converted to DateTime values and vice versa.
Statement Y: DateTimeOffset does not supports arithmetical operations
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
static void F1(params int [] y)
{
}
static void Sample()
{
int [] j = new Int32[3];
List k = new List();
// ANSWER GOES HERE
}
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
Answers:
CollectionClass<int> numbers = new CollectionClass<int> { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
Answers:
- Collection Class must implement System.Collections.Generic.ICollection<T>
- Collection Class must implement System.Collections.Generic.IList<T>
- Each of the Items in the Initializer List will be passed to the Add<T>(T item) method
Answers:
- int
- double
- long
- float
Answers:
- The actual instantiated class is dynamically created and has a base class defined in the CodeFile.
- The actual instantiated class is dynamically created and has a member representing the class defined in the CodeFile.
- The actual instantiated class is dynamically created and is a co-class of the class defined in the CodeFile.
Answers:
- Propagate container related events to the child controls.
- Propagate child events up to control hierarchy
- Distribute events between peer child controls.
- Translate control unhandled control events into exceptions.
Answers:
- <%# %>
- <%– –%>
- <!– –>
- <# >
Answers:
- The DataSets and DataTables objects requires continuous connection to the database
- All tables in a dataset must come from the same database
- A given instance of a DataTable can be in only one DataSet
- Content from multiple DataSets can easily be combined into a single DataSet that contains the net result of all changes
Answers:
- System.Web.UI.WebControls.Xml
- System.Web.UI.WebControls.Xslt
- System.Web.UI.WebControls.Substitution
- System.Web.UI.WebControls.Transform
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.
Answers:
- Statement X is correct and Statement Y is incorrect
- Statement X is incorrect and Statement Y is correct
- Both Statements X, Y are correct
- Both Statements X, Y are incorrect
Answers:
- ApplicationState
- SessionState
- ViewState
- All of the above
Answers:
- Only the UpdatePanel and any child controls go through the server lifecycle.
- The entire page always goes through the entire lifecycle.
- Only the UpdatePanel which initiated the Postback and its child controls can provide updated information.
- UpdatePanels can not be used with Master Pages.
Answers:
- They must handle case-sensitivity identically in both the GetHashCode() and Equals() methods.
- Key objects must be immutable for the duration they are used within a HashTable.
- 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.
- Each Element in a HashTable is stored as a Key/Value pair of the type System.Collections.DictionaryElement
- All of the above
Answers:
- HashSet is an unordered collection.
- The default EqualityComparer checks whether the element supplied to the HashSet is unique or not.
- HashSet provides functionality for “conceptual sets” where the rules for membership can be specified without actually creating all of the items.
Answers:
- It must contain a from clause
- It must begin with a select clause
- It can end with a group clause
Answers:
- They must be inherited from the System.Attribute.
- Attribute classes may be restricted to be applied only to application element types.
- By default, a given attribute may be applied multiple times to the same application element.
Answers:
- The interval will never restart before the page postback is complete.
- The timer control must be located outside of the UpdatePanel
- If the timer expiration triggers a postback while a previous postback is in progress, the first postback is canceled.
- The timer must always be specified as a trigger for the updatepanel which is to be update when the interval expires.
Class MyClass
{
public event EventHandler<MyArgs> MyEvent;
}
Answers:
- public void A_MyEvent(object sender, MyArgs e) { }
- public void A_MyEvent(object sender, EventArgs e) { }
- public void A_MyEvent(MyArgs e) { }
Answers:
- A certificate must be installed on the server.
- The certificate must match the web address to prevent a browser warning or error
- The certificate must be issued by an authority recognized by the client computer to prevent a browser warning or error
- All of the above
Answers:
- You can request that the garbage collector processes a generation if it determines that it is appropriate at specific points in your code
- You can control the intrusiveness of the garbage collector (how often it performs collections) while your program is running
- You can control the intrusiveness of the garbage collector (how often it performs collections) only during application initialization
Answers:
- ApplicationState
- SessionState
- ViewState
- None of the above
Answers:
- The compiler generates a backing field that is completely inaccessible from the application code.
- The compiler generates a backing field that is accessible via reflection.
- The compiler generates a code that will store the information separately from the instance to ensure its security.
string t = @”ThisIsaTest”;
Response.Write(t);
Answers:
- ThisIsaTest
- ThisIsaTest
- It will give a compilation error: Unrecognized escape sequence
Answers:
- It is pure Object Relational (O/R) model.
- It is a set of enhancements to the DataSet and DataTable classes.
- It requires the use of SQLServer as the database.
- Because LINQ is based on Queries, it can not be used to modify the data in the database.
Answers:
- comAuthenticationLevel
- comImpersonationLevel
- maxIoThreads
- requestQueueLimit
Answers:
- System.Globalization.CultureInfo
- System.Globalization.Calendar
- System.DateTime
Answers:
- Setting the ToolTip property of a control to a string containing the information.
- using the open method of the browser window object to open a new browser window and display a help related ASP.NET page
- Using the showHelp method of the browser window object to display a topic from a compiled help file (.chm).
- All of the above
Answers:
- Including .Net code within the script element with the runat attribute set to server
- Including .Net code within the code element
- Including .Net code using the @code directive on the page
- Including .Net code within the execute attribute of the individual control
Answers:
- void Sample1(object o) { int i = (int)o; }
- void Sample1(ValueType vt) { int i = (int)vt; }
- enum E { Hello, World} void Sample1(System.Enum et) { E e = (E) et; }
- class C { public int Value { get; set; } } void Sample1(C vt) { int i = vt.Value; }
Answers:
- 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
var sample = “Hello World”;
Answers:
- The actual type is determined at compilation time, and has no impact on the runtime
- The actual type is determined at runtime, and late binding takes effect
- “var” itself is a specific type defined by the framework, and no special binding takes place
Answers:
- Init
- PreLoad
- Load
- Render
Answers:
- <exception>
- <code>
- <summary>
- All of the above
Answers:
- 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
Answers:
- You declare (explicitly or implicitly) the accessibility of the property and get and set accessors, but do not provide any implementation or backing field
- You attribute a member field so that the compiler will generate get and set accessors
- The compiler creates properties for your class based on class level attributes
- They are properties which are automatically invoked as part of the object construction process
Answers:
- System.Web.Mail is not supported under version 3.5 of the Framework
- System.Web.Mail is deprecated under version 3.5 of the Framework, and it is officially recommended that System.Net.Mail be used.
- System.Web.Mail is the preferred solution when using IIS hosted applications
- There are no functional differences; the items were moved to a new namespace to better reflect their applicability
Answers:
- UserControl can directly express rendering information via markup; a Custom Server control can not.
- UserControl does not require the use of the @Register directive; a Custom Server control does require it.
- UserControl can make use of script based validation; a Custom Server control can not.
- UserControl can represent complete compositate hierarchy; a Custom Server control can not.
Answers:
- Server validation can be used alongside with client side validation.
- All data posted on Server, should be validated.
- Client Side validation typically provides a faster response (feedback) time than server validation.
- All of the above
Answers:
- Styles can be applied to all elements having the same CSS Class attribute
- Styles can be applied to specific elements based on their ID attribute
- Styles can be applied to elements based on their position in a hierarchy
- Styles can be used to invoke script based code
- All of the above
Statement X: DateTimeOffset values can be converted to DateTime values and vice versa.
Statement Y: DateTimeOffset does not supports arithmetical operations
Answers:
- Statement X is incorrect and Statement Y is correct
- Statement X is correct and Statement Y is incorrect
- Both Statements X, Y are correct
- Both Statements X, Y are incorrect
Answers:
- The Passport SDK must be installed.
- Passport authentication requires a network path between the Client and the Microsoft Passport Server
- Passport Authentication provides persistent authentication across sessions
Answers:
- The DataReader provides a cursor that can be used to move forward and backwards through the result.
- The DataReader provides random access capabilities on the result.
- The DataReader can provide the Schema information of the result to the application code.
Answers:
- WebUIValidation.js
- ClientValidation.js
- AspNetValidation.js
- USerValidation.js
Answers:
- @Register
- @Include
- @Control
- @Import
Answers:
- Support is provided for the “Suite B” set of cryptographic algorithms as specified by the National Security Agency (NSA).
- Cryptography Next Generation (CNG) classes are supported on XP and Vista systems.
- The System.Security.Cryptography.AesManaged class allows custom block size, iteration counts and feedback modes to support any Rijndael based encryption.
Answers:
- asp:ScriptManager
- asp:AjaxManager
- asp:PageManager
- asp:ClientScriptManager
Answers:
- creating an instance of System.Runtime.MemoryFailPoint and monitoring for an InsufficientMemoryException
- creating an instance of System.Runtime.MemoryFailPoint and monitoring for an OutOfMemoryException
- There is no supported application level means to determine if a specific amount of memory is available.
Answers:
- ApplicationException
- DataMisalignedException
- ExecutionEngineException
- SystemException
Answers:
- PreInit
- Init
- PreLoad
- PreRender
- Render
Answers:
- Enabling debug information in the .NET Assembly
- Setting the debug attribute of the compilation element to true in the web.config file.
- Enabling ASP.NET debugging in the IIS metabase.
Answers:
- C# allows non-type template parameters
- C# supports explicit specialization
- C# allows the type parameter to be used as the base class for the generic type
- C# enforces that all codes are valid for all types of parameters
Answers:
- Bringing various existing communication technologies into a unified environment.
- Cross vendor/platform communication.
- Support for asynchronous communications.
- Support for distributed applications based on technologies such as MSMQ and/or COM+
- All of the above
Answers:
- Administrator
- IUSER_MachineName (where the MachineName is the actual computer name)
- ASPNET
- Guest
Answers:
- Examining the UserLanguages property of the current Request object.
- Examining the CurrentCulture property of the current Request object.
- Examining the Language property of the current Page object.
Answers:
- More concise syntax
- The types for 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
Answers:
- ASP.NET authentication handles these by default in a manner equivalent to .aspx pages
- ASP.NET authentication can be associated with these extensions using aspnet_isapi.dll in IIS 6.0, for the appropriate directory
- ASP.NET authentication cannot be used for this purpose
Answers:
- A Nullable type is a reference type.
- An implicit conversion exists from any non-nullable value type to a nullable form of that type.
- 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
Answers:
- 1
- 25
- 250
- 100
- 500
Answers:
- ApplicationState
- SessionState
- ViewState
- None of the above
static void F1(params int [] y)
{
}
static void Sample()
{
int [] j = new Int32[3];
List k = new List();
// ANSWER GOES HERE
}
Answers:
- F1(j);
- F1(k);
- F1(1, 2, 3);
- F1(new [] {1,2,3})
- None of the above
Answers:
- Load
- LoadComplete
- PreRender
- Init
Answers:
- Remove the cookie from the System.Web.UI.Page.Request.Cookies collection.
- Remove the cookie from the System.Web.UI.Page.Request.Browser.Cookies collection.
- Set the Expires property to DateTime.Now for a cookie in the Web.UI.Page.Response.Cookies
- Remove the cookie from the System.Web.UI.Page.Response.Cookies collection.
Answers:
- WS-Addressing
- WS-MetadataExchange
- WS-Security
- WS-Atomic Transaction
- All of the above
Answers:
- ServiceContract
- OperationContract
- DataContract
- MessageContract
Answers:
- A hidden variable within the page that is included with each round tip.
- A cookie which resides on the client�s computer
- A server side in-process memory cache
- Instance member variables of the Page class
Answers:
- They can be 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
Answers:
- It must be enabled in the web.config of the ASP.Net application.
- Forms Authentication must be enabled in the web.config of the ASP.Net Application
- Cookies must be enabled in the browser
- A redirection url must be supplied for successful login.
No comments:
Post a Comment