Upwork Test Answers: Get all the correct answers of most recent and possible Upwork Tests A to Z (Updated on Jan, 2016)
Cover Letter Templates: These cover letter samples are not only for Upwork job, but also you will have some idea about your real life job
 
Freelance Profile Overviews: Different Profile samples and overviews of experts, advanced and intermediate level freelancers
For Newbie of Upwork: Upwork Help - How to apply for a job in Upwork with 10 most important articles about Upwork

A to Z View - All Upwork Test Answers

DotNet 3.5 using C# Test Answers

Here you will find all the DotNet 3.5 using C# Test Answers of Upwork .Net Technology category, Please press CTRL + F to find your desired answers of the test.
-----------------------------------------------------------------------------------------

1. When Implementing System.EnterpriseServices.ServicedComponent derived classes, which of the following statements are true?
Answers: • Methods can be configured to automatically mark a transaction as complete by the use of attributes.


2. Which of the following statements are applicable to LINQ to SQL?
Answers: • It is an O/RM (object relational mapping) implementation.



3. Which of the following are true about anonymous types?
Answers: • Two anonymous types with the same named parameters in the same order declared in different classes have the same type.


4. The output generated by the following code will be:


string t = "This Is a Test";
t.Replace("T", "?");
Console.WriteLine(t);
Answers: • This Is a Test


5. Which of the following code samples show a valid static constructor?
Answers: • class Sample { static Sample() { } }


6. Which of the following are true with respect to the standard implementation of Garbage Collection?
Answers: • Objects become eligible for garbage collection as soon as it is impossible for any code to access them
• Objects which implement finalizers will always have the finalizer called at some point


7. Which of the following types guarantee atomic reads and writes?
Answers: • int
• float


8. Which of the following does using Initializer Syntax with a collection as shown below require?


CollectionClass numbers = new CollectionClass { 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 };
Answers: • The Collection Class must implement System.Collections.Generic.ICollection<T>
• Each of the Items in the Initializer List will be passed to the Add<T>(T item) method


9. Which features that are not supported in the System.TimeZone class does the System.TimeZoneInfo class provide?
Answers: • It provides a means of enumerating the known time zones that are available on the local system
• It provides functionality to create custom time zones


10. Within Windows Workflow Foundation, Compensating Actions are used for:
Answers: • provide a means to undo a successfully committed transaction later


11. Of which elements does Generics allow parameterization by type?
Answers: • Structs


12. Which of the following do the advantages of Lambda Expressions over Anonymous methods include?
Answers: • All of the above


13. In which of the following types of applications can Windows Workflow Foundation be used?
Answers: • All of the above


14. Which of the following items are recommended when using XML comments to generate documentation?
Answers: • <summary>


15. With which class is the task of mapping a specific point in time into units, such as weeks, months, and years accomplished?
Answers: • System.Globalization.Calendar


16. Which of the following are true regarding the System.Collections.Generic.HashSet<T> class?
Answers: • HashSet requires that each element be unique as determined by either a supplied EqualityComparer or the default EqualityComparer


17. Which of the following are true regarding System.Threading.ReaderWriterLockSlim?
Answers: • A thread which has a read lock on a resource may not acquire a write lock on the same resource


18. The framework provides three different timer classes. Select the answer that properly matches the class with the listed characteristic.
Answers: • System.Timers.Timer: Designed for use with worker threads in a multithreaded environment. Can move among threads to handle the raised Elapsed event May result in more accuracy than System.Windows.Forms.Timer instances.


19. Which of the following advantages does System.Collections.IDictionaryEnumerator provide over System.Collections.IEnumerator?
Answers: • It adds properties for direct access to both the Key and the Value


20. While using the capabilities supplied by the System.Messaging classes, which of the following are true?
Answers: • The first entry in a MessageQueue must be removed from the queue before the next entry can be accessed


21. What impact will using implicitly typed local variables as in the following example have?
var sample = "Hello World";
Answers: • The actual type is determined at compilation time, and has no impact on the runtime


22. Which of the following are true about System.GC under version 3.5 of the Framework?
Answers: • You can request that the garbage collector process a generation if it determines that it is appropriate at specific points in your code


23. Which of the following operators can be overloaded?
Answers: • Logical (&,|,^)


24. Which of the following does the System.IO.Pipes namespace provide?
Answers: • All of the above


25. Which of the following statements do Expression Trees fit best?
Answers: • All of the Above


26. By which contract are the ws-addressing action and replyaction elements of the soap envelop controllable when Windows Communication Foundation is used?
Answers: • MessageContract


27. Which of the following are true when comparing ADO.NET with Microsoft DNA (Distributed interNet Applications)?
Answers: • ADO.NET provides significantly better performance.


28. When Deleting a DataRow from the DataRowCollection of a DataTable, you can:
Answers: • use the DataRowCollection.Remove method to mark the row for deletion when DataRow.AcceptChanges is called.


29. Which of the following are required to be true by objects which are going to be used as keys in a System.Collections.HashTable?
Answers: • All of the above


30. Which of the following are goals of Windows Communication Foundation?
Answers: • All of the above


31. Which access limitation is found in a class member declared protected internal?
Answers: • Access is limited to the containing class plus any classes derived from the containing class or any other class in the current assembly


32. When Windows Communication Foundation is used to develop a Web Service, which of the following are supported?
Answers: • All of the above


33. To which contract is the SessionMode property to disallow, require, or permit applied when Windows Communication Foundation is used?
Answers: • ServiceContract


34. Which of the following is not supported by remoting object types?
Answers: • client activated


35. The default number of threads per processor in the System.Threading.ThreadPool class under version 3.5 of the Framework is:
Answers: • 250


36. To which of the following can System.IO.IsolatedStorage not be scoped?
Answers: • Restricted to a specific Physical Media


37. When using an automatic property, which of the following statements is true?
Answers: • The compiler generates a backing field that is a private instance member with a leading underscore that can be programmatically referenced.


38. When using an implicitly typed array, which of the following is most appropriate?
Answers: • 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


39. Which of the following characteristics is present in the DateTime type?
Answers: • It contains a member indicating whether the time is UTC, Local, or Unspecified


40. Which of the following are true about using ADO.NET DataSets and DataTables?
Answers: • A given instance of a DataTable can be in only one DataSet
• Changes made to multiple tables within a DataSet can easily be transferred to a new DataSet which contains only the changes


41. Which of the following are true regarding System.Web.Mail and System.Net.Mail namespaces?
Answers: • System.Web.Mail is deprecated under version 3.5 of the Framework, and it is officially recommended that System.Net.Mail be used.


42. In which of the following ways do structs differ from classes?
Answers: • Structs cannot have virtual methods


43. To which of the following do automatic properties refer?
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


44. Given the code below, which of the following items will cause a compilation error?


static void F1(params int [] y)
{
}
static void Sample()
{
int [] j = new Int32[3];
List k = new List();
// ANSWER GOES HERE
}
Answers: • F1(k);


45. Which of the following are true about Nullable types?
Answers: • A Nullable type is a structure.


46. For which of the following scenarios does Reflection.Emit provide support?
Answers: • Defining assemblies dynamically


47. Which of the following are true about System.Security.Cryptography under version 3.5 of the framework
Answers: • None of the implementations are FIPS-certified


48. Custom non-fatal exceptions should be derived from:
Answers: • ApplicationException


49. class Sample
{
public Sample(int x) { }
}
In the above code, which of the following other class constructors can directly access the provided constructor?
Answers: • public Sample() : this(1) { }


50. Which of the following are characteristics of the System.Threading.Timer class?
Answers: • The thread which creates the timer must have a message processing loop (i.e. be considered a UI thread)


51. Which of the following is not an unboxing conversion?
Answers: • class C { public int Value { get; set; } } void Sample1(C vt) { int i = vt.Value; }


52. Which of the following regarding the System.DateTimeOffset structure are true?
Answers: • It provides an exact point in time relative to the UTC time zone


53. Determining the availability of sufficient memory for an operation can be accomplished by:
Answers: • There is no supported application level means to determine if a specific amount of memory is available.


54. When using version 3.5 of the framework in applications which emit a dynamic code, which of the following are true?
Answers: • A Partial trust code can not emit and execute a code


55. Which of the following characteristics are found in a query expression?
Answers: • It must begin with a from clause


56. When using the Demand method of System.Security.IPermission, which of the following will occur?
Answers: • For permissions which do a stack walk, an exception will occur if ANY of the calling codes does not have the required permission


57. Which of the following characteristics do classes in the System.Drawing namespace such as Brush,Font,Pen, and Icon share?
Answers: • They encapsulate native resource and must be properly Disposed to prevent potential exhausting of resources.


58. Which of the following are true regarding event declaration in the code below?


class Sample
{
event MyEventHandlerType MyEvent;
}
Answers: • MyEventHandlerType must take two parameters, the first of the type Object, and the second of a class derived from System.EventArgs


59. Which of the following statements apply to developing .NET code, using .NET utilities that are available with the SDK or Visual Studio?
Answers: • Developers can generate XML Schemas from class definitions contained within an assembly.


60. Which of the following is true about C# generics?
Answers: • C# enforces that all codes are valid for all types of parameters


61. Which of the following scenarios are applicable to Window Workflow Foundation?
Answers: • Document-centric workflows  --- or ---- • Human workflows


62. When using a DataReader to access the results of a Database operation, which of the following are true?
Answers: • The Application code can reference the first row of a multi-row result set faster than it can be by loading it directly into a DataTable  --- or ---- • The DataReader can provide the Schema of the result to the application code.


63. Which of the following are true regarding multiple versions of an assembly?
Answers: • When multiple versions of an assembly are available on the search path (AKA private assemblies), the runtime will use the first matching assembly with a version number equal to or higher than the assembly version that was originally linked against
64. Which of the following are true about declarative attributes?
Answers: • They must be inherited from the System.Attribute.

65. Which of the following are true about Extension methods?
Answers: • They must be declared static ---- or ---- • Extension methods with the same signature for the same class may be declared in multiple namespaces without causing compilation errors


66. Which of the following are static methods of the System.Reflection Activator class?
Answers: • CreateComInstanceFrom  --- or --- • CreateInstanceFrom  --- or --- • CreateInstance