0% found this document useful (0 votes)
21 views43 pages

PRN221 FE Trial

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
21 views43 pages

PRN221 FE Trial

Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 43

PRN221 – FE - Trial

1. Choose the correct statement about key components of the System.Net.* Namespaces
a. HttpServer for consuming HTTP web APIs and RESTful services
b. WebRequest and WebResponse classes for high-level control over client-side TCP
or UDP operations
c. All of the others
d. A WebClient facade class for simple download/upload operations via HTTP or FTP
d
2. To configure a custom number of reconnect attempts before disconnecting or change the
reconnect timing, the withAutomaticReconnect accepts an array of numbers
representing the delay in milliseconds to wait before starting each reconnect attempt.
Choose the correct option for making automatically reconnect.
a. const connection = new signalR.HubConnectionBuilder() .withUrl("/chathub")
.withAutomaticReconnect(0, 0, 10000) .create();
b. const connection = new signalR.HubConnectionBuilder() .withUrl("/chathub")
.withAutomaticReconnect([0, 0, 10000]) .build();
c. const connection = new signalR.HubConnectionBuilder() .withUrl("/chathub")
.withAutomaticReconnect([0], [0], [10000]) .build();
d. None of the others
e. const connection = new signalR.HubConnectionBuilder()
.withUrl("/chathub").withAutomaticReconnect([0, 0, 10000]).create();
b
3. Choose the correct statement related to Networking Definitions
a. Port: unsigned 4-byte integer helps operating system differentiating a
network communicating process
b. IP address includes IPv4 (4-byte) and IPv6 (6-byte)
c. IP address (Internet Protocol): unsigned integer helps to identify a
network element(computer, router, etc)
d. None of the others
c
4. Which of the following methods of the HttpClient Class can be used to send a
POST request to the specified Uri as an asynchronous operation?
a. CreatePostAsync(String, HttpContent)
b. PostRequestAsync(String, HttpContent)
c. PutAsync(String, HttpContent)
d. PostAsync(String, HttpContent)
d
5. Which of the following classes of the System.Threading.Tasks Namespace
provides support for creating and scheduling Task objects?
a. TaskFactory
b. Task
c. TaskInit
d. None of the others
e. TaskScheduler
a
6. In the case working ASP.NET SignalR with JavaScript client library, which the
following code to create and start a connection?
a. var connection = new signalR.ConnectionBuilder() .withUrl("/chatHub")
.build(); connection.start();
b. var connection = new signalR.HubConnectionBuilder() .withUrl("/chatHub")
.create(); connection.start();
c. var connection = new signalR.HubConnectionBuilder() .withUrl("/chatHub") .build();
connection.start();
d. var connection = new signalR.HubBuilder() .withUrl("/chatHub") .build();
connection.start();
c
7. A hub is a class that serves as a high-level pipeline that handles client-server
communication. Create a SignalR for your application by adding a class named
ChatHub that inherits from Microsoft.AspNetCore.SignalR.Hub
a. public class ChatHub : IHub { public async Task SendMessage(string user, string
message) { await Clients.All.SendAsync("ReceiveMessage", user, message); } }
b. public class Hub : ChatHub { public async Task SendMessage(string user,
string message) { await Clients.All.SendAsync("ReceiveMessage", user,
message); } }
c. public class ChatHub : Hub { public async Task SendMessage(string user,
string message) { await Clients.All.SendAsync("ReceiveMessage", user,
message); }}
c d. public class ChatHub : IHubContext { public async Task SendMessage(string user,
8. Choose the correct statement related to the HttpClient Class
a. HttpClient was written in response to the growth of TCP-based web APIs and TCP
services to provide a better experience than the WebClient class
b. None of the others
c. HttpClient is a newer API for working with TCP Service and is designed to work
well with libraries, REST-based services, and custom authentication schemes
d. HttpClient provides another layer on top of HttpWebRequest and HttpWeb Response
d
9. ASP.NET Core SignalR supports two protocols for encoding messages. Each
protocol has serialization configuration options. Please choose the correct protocols.
a. JSON and MessagePack
b. BSON and MessagePack
c. JSON and BSON
d. JSON and XML
a
10. Which of the following statements related to Worker Service .NET is False?
Statement 1: A worker service is a .NET project built using a template which supplies a
few useful features that turn a regular console application into something more powerful
Statement 2: A worker service runs on bottom of the concept of a host, which maintains
the lifetime of the application. The host also makes available some familiar features, such
as dependency injection, logging, and configuration
a. Statement 2
b. Statement 1 and 2
c. Statement 1
d. None of the others
a
11. Choose the correct option to create hub filters.
a. Create a filter by declaring a class that inherits from Hub<IFilter>, and add the
OnConnectedAsync method.
b. Create a filter by declaring a class that inherits from IFilter, and add
the InvokeMethodAsync method.
c. Create a filter by declaring a class that inherits from Hub<IHubFilter>, and add
the OnConnectedAsync method.
d. Create a filter by declaring a class that inherits from IHubFilter, and add
the InvokeMethodAsync method.
e. None of the others
d
12. Which of the following properties of the HttpClient Class can be used to get or set the
base address of Uniform Resource Identifier (URI) of the Internet resource used
when sending requests?
a. BaseAddress
b. GetAddress
c. ContentURI
d. BaseURI
a
13. Which of the following applications that Worker Services will generally be long-running
services, performing some regularly occurring workload?
a. Aggregating data from a data store
b. Reacting to file changes in an object/file store
c. Processing messages/events from a queue, service bus, or event stream
d. All of the others
e. None of the others
d
14. To enable SignalR in the specific application, call the AddSignalR extension method to
configure the IoC container with services required by SignalR. Choose following code
to add to ConfigureServices method (Startup.cs).
a. None of the others.
b. public void ConfigureServices (IServiceCollection services) { // ...
services.AddSignalR().Start(); } public void Configure(IApplicationBuilder app,
HostingEnvironment env) { // ... app.UseAuthentication(); app.UseMvc();
app.UseSignalR (builder => { builder.MapHub< ChatHubClass >("/chat").Start(); }); }
c. public void ConfigureServices (IServiceCollection services) {// ...
services.AddSignalR(); } public void Configure(IApplicationBuilder app,
HostingEnvironment env) { // ... app.UseAuthentication();
app.UseMvc(); app.UseSignalR (builder => {
c builder.MapHub("/chat"); }); }
15. Which of the following statements related to the Hyper-Threading (HT) is True?
a. None of the others
b. Hyper-threading (HT) technology is a proprietary technology that was developed by
Intel that improves the sequential processing of computations
c. Hyper-threading (HT) enabled single processor chips to run with sixteen
virtual (logical) cores and are capable of executing sixteen tasks at a time
d. In Hyper-threading (HT) technology, each of these logical cores is called a hardware
thread and can be scheduled separately by the operating system (OS) scheduler e. All
of the others
d
16. Which of the following ways can be used to create a task using Task class in .NET?
a. Using lambda expressions syntax
b. Using delegate
c. Using the Action delegate
d. All of the others
d
17. Which of the following statements related to Protocol is True?
a. All of the others
b. UDP (User Datagram Protocol) is a protocol that sends independent packets of
data, called datagrams, from one computer to another with no guarantees about the
arrival
c. The protocol is set rules for packaging data of a network communication because
client and server can be working in different platform
d. TCP (Transmission Control Protocol) is a connection-based protocol (only one
connecting line only) that provides a reliable flow of data between two computers
a based on the acknowledged mechanism
18. Which of the following statements related to Task Parallel Library (TPL) is False?
a. All of the others
b. None of the others
c. The Task Parallel Library (TPL) is a set of public types and APIs in the
System.TPL and System.Threading.Tasks namespaces
d. By using TPL, we can maximize the performance of our code while focusing on
the work that our program is designed to accomplish
c
19. Which of the following properties of the WebRequest class can be used to get the URI
of the Internet resource associated with the request?
a. RequestUri
b. None of the others
c. RequestURL
d. RequestParam
a
20. SignalR provides two models for communicate between clients and severs: Persistent
Connections, Hubs. Choose the correct information about Persistent Connections.
a. Persistent Connections provide direct access to a low-level communication protocol
that signalR provides. Each client connection to a server is identified by a connectionID.
b. None of the others.
c. If you have multiple types of messages that you want to send between a server
and a client then it is recommended to use Persistent Connections so you do not need to
do your own dispatching.
d. Persistent Connections provide a High-level API for the client and server to call each
other's method. It will be very familiar to those developers who have worked on remote
invocation APIs.
a
21. Choose the correct statement related to Mono-Processor Systems
a. The microprocessor receives data from file streams, executes the necessary
processes, and sends the results in an output file
b. The mono-processor systems use old-fashioned, classic computer architecture
and were developed by the outstanding mathematician, John von Neumann
c. The mono-processor system works with many users and many tasks running
b
22. A hub is a class that serves as a high-level pipeline that handles client-server
communication. Create a SignalR for your application by adding a class named ChatHub
that inherits from Microsoft.AspNetCore.SignalR.Hub a. public class ChatHub :
IHubContext { public async Task SendMessage(string user, string message) { await
Clients.All.SendAsync("ReceiveMessage", user, message); } }
b. public class Hub : ChatHub { public async Task SendMessage(string user,
string message) { await Clients.All.SendAsync("ReceiveMessage", user,
message); } }
c. public class ChatHub : Hub { public async Task SendMessage(string user,
string message) {await Clients.All.SendAsync("ReceiveMessage", user, message);
}}
d. public class ChatHub : IHub { public async Task SendMessage(string user,
string message) { await Clients.All.SendAsync("ReceiveMessage", user,
message); } }
c
23. Which of the following methods of the WebResponse Class that returns the data stream
from the Internet resource?
a. GetResponseStream()
a b. GetResponse()
24. Handler methods in Razor Pages are methods that are automatically executed as a result
of a request. Choose the correct answer of handler methods in Razor Pages.
a. The default convention works by matching the HTTP verb used for the request to
the name of the method: OnGet(), OnPost(), OnPut() etc.
b. All of the others.
c. None of the others.
d. Handler methods also have optional asynchronous equivalents:
OnPostAsync(), OnGetAsync() etc.
B
25. Suppose that you want to configure the root folder for Razor Pages to be something other
than the default. What the following code should you put in ConfigureServices method of
Startup.cs file?

a.public void ConfigureServices(IServiceCollection services)


{
services.AddRazorPages();
}

b.public void ConfigureServices(IServiceCollection services)


{
services.AddRazorPages().AddRazorPagesOptions(options =>
{ options.RootDirectory = "/Content";
});
}

c.public void ConfigureServices(IServiceCollection services)


{
services.AddRazorPages().AddRazorPagesOptions("/Content");
}

d.public void ConfigureServices(IServiceCollection services)


{
services.AddRazorPages().AddRazorPagesRootDirectory(options =>
{ options.RootDirectory = "/Content";
});
}
b
26. Which of the following attributes of the JSON can be used to prevent a property from
being serialized or deserialized?

a.PropertyAttribute
b.IgnoreAttribute
c.None of the others
d.EmptyAttribute
b
27. Which of the following data type is not supported by JSON?
a.Number
b.Byte
c.Object
d.Boolean
b
28. Which of the following properties of the WebRequest class can be used to get or set the
content length of the request data being sent?
a.Credentials
b.ContentType
c.All of the others
d.ContentLength
d
29. Choose the correct statement(s) about Windows Presentation Foundation (WPF)
a.WPF version 3.0 was first released as a part of .NET Framework 3.0 in the year 2006
and received its major updates and enhancements in version 3.5 released by .NET
Framework 3.5
b. All of the others.
c. WPF is not include a flexible hosting model, which makes it straightforward to host
a video in a button
d. None of the others
a
30. Choose the main purpose of the Razor Pages PageModel class.
a. To provide the easy way to understand the UI components with processing code logic
for the page.
b. To provide clear separation between the UI layer (the .cshtml.cs view file)
and processing logic for the page.
c. To provide clear separation between the UI layer (the .cshtml view file) and
processing logic for the page.
d. To provide the easy way to reduce the code for the UI components.
c
31. or the Uniform Resource Identifier (URI) as follows:
http://www.myweb.com:8888/info/page.html?query#top. What is the AbsolutePath?
a./page.html?query
b./info/page.html
c./info/page.html?query#top
d./info/page.html?query
b
32. Which of the following is a valid JSON Document to store an array of objects?

a.
[
"employees":{
{"firstName":"John", "lastName":"Doe"},
{"firstName":"Anna", "lastName":"Smith"}
}
]

b.
[
"employees":{
["firstName":"John", "lastName":"Doe"],
["firstName":"Anna", "lastName":"Smith"]
}
]

c.
{
"employees":[
{'firstName'=John; 'lastName'=Doe},
{'firstName'=Anna; 'lastName'=Smith}
]
}

d.
{
"employees":[
{"firstName":"John", "lastName":"Doe"},
{"firstName":"Anna", "lastName":"Smith"}
]
}
d
33. Choose the correct statement about JSON Syntax Rules

a. Data is in name/value pairs


b. Curly braces hold arrays
c. Square brackets hold objects
d. Data is separated by an ampersand
a
34. What is the Deserialization process?

a. Deserialization is the reverse process where the binary stream is used to recreate
the actual data in the application
b. Deserialization is the act of taking data from XML or JSON and convert to bytes
stream c.Deserialization works in reverse, taking a data stream and reconstituting it into
in- memory objects and stored on client-side
d.Deserialization works in reverse, taking a data stream and reconstituting it into an in-
memory object or object graph
d
35. Choose the correct answer with Server-side validation in Razor Pages.
a.
if (!ModelState.IsCorrect)
{
return Page();
}

b.
if (!ModelState.IsTrue)
{
return Page();
}

c.
if (!ModelState().IsValid())
{
return Page();
}
d.
if (!ModelState.IsValid)
{
return Page();
}
d
36. For the Uniform Resource Identifier (URI) as follows :
http://www.domain.com:9999/info/page.html?query#top
What is the host?

a.www.domain.com
b.http://www.domain.com
c.www.domain.com:9999
d.http://
a
37. Choose the correct answer about Razor code block.

a.
@{
// Code here
}

b.
%{
// Code here
}
c.
${
// Code here
}

d.
#{
// Code here
}
a
38. Which of the following ways can be used to implement the Dependency Injection in the
.NET application?
a. All of the others
b. Property Injection
c. Method Injection
d.Constructor
a Injection
39. Which of the following is one of the basic features of Dependency Injection (DI)?
a.Registration
b.Implementation
c.Maintenance
d.Deployment
a
40. Which of the following assemblies belongs to the WPF Managed Layer in the WPF
Architecture?
a.All of the others
b.PresentationFramework.dll
c.WindowBase.dll
d.PresentationCore.dll
a
41. Give the block of code
[XmlRoot("Candidate")]
public class Person {
[XmlElement("FirstName")]
public string Name { get; set; }
[XmlElement("RoughAge")]
public int Age { get; set; }
}
class Program{
static void Main(string[] args){
Person p1 = new Person() { Name="David", Age=30 };
var xs = new XmlSerializer(typeof(Person));
using Stream s1 = File.Create("pe.xml");
xs.Serialize(s1, p1);
s1.Close();

using Stream s2 = File.OpenRead("person.xml");


var p2 = (Person)xs.Deserialize(s2);
Console.WriteLine("***Person Info***");
Console.WriteLine($"Name: {p2.Name}, Age: {p2.Age}");
s2.Close();
Console.ReadLine();
}
}
Choose the result.
a.Syntax Error

b.
***Person Info***
<?xml version="1.0"?>
<Candidate xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<FirstName>David</FirstName>
<RoughAge>30</RoughAge>
</Candidate>
c.Throws an exception
d.
***Person Info***
Name: David, Age: 30
c
42. Which of the following statements related to the Inversion of Control (IoC) is True?

a. It makes the application difficult to test and maintain


b. It is used to invert different kinds of controls in object-oriented design to achieve
high coupling
c. All of the others
d. It is a design principle
e. None of the others
d
43. Which of the following methods of the HttpClient Class can be used to send a POST
request to the specified Uri as an asynchronous operation?

a.PostAsync(String, HttpContent)
b.PutAsync(String, HttpContent)
c.CreatePostAsync(String, HttpContent)
d.PostRequestAsync(String, HttpContent)
a
44. Choose the correct statement about eXtensible Application Markup Language
(XAML) in the WPF

a. XAML directly represents the instantiation of objects in a specific set of backing


types defined in assemblies
b. All of the others
c. XAML is a declarative markup language. As applied to the .NET Core
programming model, XAML simplifies creating a UI for a .NET Core app
d. XAML enables a workflow where separate parties can work on the UI and the logic
of an app, using potentially different tools
b
45. Which of the following methods of the XmlSerializer class returns a writer used to
serialize the object?

a.GetWriter()
b.CreateWriter()
c.CreateObjectWriter()
d.GetObjectWriter()
b
46. Which of the following statements related to Interface Segregation Principle is True?

a. All of the others


b. None of the others
c. Many client-specific interfaces are better than one general-purpose interface
d. The applications should be designed using multiple interfaces to improve
their correctness
e. Applications should be designed using multiple abstraction classes to easily extend
their functionality
c
47. Which of the following is a valid XML Document?
a.
<?xml version="1.0" encoding="UTF-8"?>
<Order>
<Order Id=001>
<Customer>David &amp; Jason</Customers>
</Order>
</Orders>

b.
<?xml version="1.0" encoding="UTF-8"?>
<Orders>
<order Id="001">
<Customer>David & Jason</customer >
</Order>
</orders>

c.
<?xml version="1.0" encoding="UTF-8"?>
<Orders>
<Order Id=001>
<Customer>David & Jason</Customer >
</Order>
</Orders>

d.
None of the others.
e.
<?xml version="1.0" encoding="UTF-8"?>
<Orders>
<Order Id="001">
<Customer>David &amp; Jason</Customer >
</Order>
</Orders>
e
48. Which of the following statements about the JsonSerializer is True?

a. None of the others


b. Provides functionality to serialize objects into text documents and deserialize them
into file streams
c.Provides functionality to serialize objects or value types to JSON and to deserialize
JSON into objects or value types
d.Provides functionality to serialize data or reference types to JSON and to deserialize
JSON into streams
c
49. The scaffolding tool features a number of generators including ones for producing MVC
areas, controllers and views, and Razor Pages. Choose the templates exist for Razor
Pages.
a.Empty, Create, Edit, Delete, Details, ListAll
b.Empty, AddNew, Edit, Delete, Details, ListAll
c.Empty, New, Edit, Delete, Details, List
d.Empty, Create, Edit, Delete, Details, List
d
50. Model Binding in Razor Pages is the process that takes values from HTTP requests and
maps them to handler method parameters or PageModel properties. Choose the correct
way to bind the posted form values to handler method parameters.

a.
[BindProperties]
public class ModelBindingDemo : PageModel
{
public void OnGet()
{
}
public void OnPost(string name, string email)
{
ViewData["confirmation"] = $"{name}, information will be sent to {email}";
}
}

b.
public class ModelBindingDemo : PageModel
{
[BindProperty]
public string Name { get; set; }
[BindProperty]
public string Email { get; set; }
public void OnGet()
{
}
public void OnPost()
{
ViewData["confirmation"] = $"{Name}, information will be sent to {Email}";
}
}
c.
[BindProperties]
public class ModelBindingDemo : PageModel
{
[BindProperty]
public string Name { get; set; }
[BindProperty]
public string Email { get; set; }
public void OnGet()
{
}
public void OnPost()
{
ViewData["confirmation"] = $"{Name}, information will be sent to {Email}";
}
}

d.
public class ModelBindingDemo : PageModel
{
public void OnGet()
{
}
public void OnPost(string name, string email)
{
ViewData["confirmation"] = $"{name}, information will be sent to {email}";
}
}
b
51. Choose the correct option for enabling session state in Razor Pages.

a.
public void ConfigureServices(IServiceCollection services)
{
services.CreateSession();
services.CreateMemoryCache();
// ...
}

public void Configure(IApplicationBuilder app, IHostingEnvironment env)


{
app.UseStaticFiles();
app.UseSession();
// ...
}
b.
public void ConfigureServices(IServiceCollection services)
{
services.UseSession();
services.UseMemoryCache();
// ...
}

public void Configure(IApplicationBuilder app, IHostingEnvironment env)


{
app.AddStaticFiles();
app.AddSession();
// ...
}

c.
public void ConfigureServices(IServiceCollection services)
{
services.AddSession();
services.AddMemoryCache();
// ...
}

public void Configure(IApplicationBuilder app, IHostingEnvironment env)


{
app.UseStaticFiles();
app.UseSession();
// ...
}

d.
public void ConfigureServices(IServiceCollection services)
{
services.AllowSession();
services.AllowMemoryCache();
// ...
}

public void Configure(IApplicationBuilder app, IHostingEnvironment env)


{
app.AddStaticFiles();
app.AddSession();
// ...
}
c
52. Choose the correct information about JsonSerializerOptions.
a.
var option = new JsonSerializerOptions()
{ WriteIndenting = true,
ReadCommentHandling = JsonCommentHandling.Skip,
AllowTrailingCommas = true
};
b.
var option = new JsonSerializerOptions()
{ WriteIndented = true,
ReadCommentHandling = JsonCommentHandling.Skip,
AllowTrailingCommas = true
};
c.
var option = new JsonSerializerOptions()
{ Write = true,
ReadCommentHandling = JsonCommentHandling.Skip,
AllowTrailingCommas = true
};
d.
var option = new JsonSerializerOptions()
{ Indented = true,
ReadCommentHandling = JsonCommentHandling.Skip,
AllowTrailingCommas = true
};
b
53. Which of the following statements related to the XML is True?
- Statement 1. XML stands for Extensible Markup Language. It is a text-based
markup language derived from Standard Generalized Markup Language (SGML)
- Statement 2. XML tags identify the data and are used to store and organize the data,
rather than specifying how to display it like HTML tags, which are used to display the
data. Choose a correct answer:

a. Statement 1 and 2
b. Statement 2
c. None of the others
d. Statement 1
a
54. The TextBox control shows a default context menu with options to Cut, Copy and
Paste. Can we override this context menu by defining our own in the TextBox control?
A. True
B. False
a
55. Can we store the ContextMenu in Resource so that we can reuse it for various control on
a form?
A. True
B. False
a
56. In WPF Padding controls how much extra space gets placed around the inside edges
of the element.
A. True
B. False
a
57. Visibility (defined on UIElement) might sound like a strange property to talk about in
the context of layout, but it is indeed relevant. An element's Visibility property actually
isn't Boolean, but rather a three-state System.Windows.Visibility enumeration. One of Its
value is "Collapsed" What is the meaning of this value
A. The element is invisible yet still participates in layout.
B. The element is invisible and does not participate in layout
C. The element gets rendered and participates in layout.
D. None of the above
b
58. BAML can't be decompiled back into XAML
A. True
B. False
a
59. The .NET Framework 4.0 introduces a handful of new features for the XAML
language. This second generation of the XAML language is referred to as
A. XAML2006
B. XAML2008
C. XAML2009
D. None of these
c
60. FrameworkElement is derived from
A. UIElement
B. ContentControl
C. Application
D. Control
a
61. WPF separates the appearance of an user interface from its behavior. The appearance
is generally specified in the .
A. HTML
B. XAML
C. XML
D. XSLT
b
62. Which of the following layout is not available in WPF?
A. StackPanel
B. Canvas
C. Grid
D. Table
d
63. x:Static and data binding markup extensions are same.True or false?
A. True
B. False
b
64. WPF is a replacement to DirectX.True or False?
A. True
B. False
b
65. which is dependency property in this code:
A. Width
B. Canvas.Left
C. Canvas
D. None of above
b
66. Transformations are available in which namespace?
A. System.Windows.UIElement
B. System.Windows.FrameworkElement
C. System.Windows.Media
D. None of above
c
67. Which tool(s)is/are used to develop WPF applications?
A. Visual Studio
B. Expression Blend
C. Both a & b
D. Only a
c
68. WrapPanel Class comes under assembly.
A. PresentationCore
B. PresentationFramework
C. milcore
D. None of above
b
69. Development is more efficient because designers can implement an application's
appearance simultaneously with developers who are implementing the
application's behavior.True or false?
A. True
B. False
a
70. A key element of the Trustworthy Computing initiative in WPF is .
A. XAML
B. SDL
C. XAP
D. None of above
b
71. Which of the following is routing strategy of Routed events?
A. Bubbling
B. Direct
C. Tunneling
D. All of above
d
72. Child controls are virtualized and arranged on a single line that is either horizontally
or vertically oriented. Is true about?
A. DockPanel
B. VirtualizingStackPanel
C. WrapPanel
D. StackPanel
b
73. Child controls are positioned in left-to-right order and wrapped to the next line when
there are more controls on the current line than space allows.Is true about?
A. WrapPanel
B. StackPanel
C. VirtualizingStackPanel
D. DockPanel
a
74. In DockPanel Child controls are aligned to the edges of the panel.True or False?>
A. True
B. False
a
75. Which of the following is not WPF model(used to create a new control/custom control)?
A. User Control Model
B. Control Model
C. Framework Element Model
D. Element Model
d
76. One of the primary architectural philosophies used in building WPF was a preference
for properties over methods or events.
A. True
B. False
a
77. Which of the following class is used to implement Trees in WPF?
A. LogicalTreeHelper
B. VisualTreeHelper
C. AbstractTreeHelper
D. a & b
d
78. class provides the GetChildren, GetParent, and FindLogicalNode methods for
logical tree traversal.
A. LogicalTreeHelper
B. VisualTreeHelper
C. AbstractTreeHelper
D. a & b
a
79. is a DependencyProperty instance, which is obtained as a return value
when registering a dependency property, and then stored as a static member of a class.
A. Dependency property
B. Dependency property identifier
C. CLR "wrapper"
D. None of above
b
80. Windows Presentation Foundation (WPF) introduces events that can invoke
handlers that exist on various listeners in the element tree of an application.
A. routed
B. bubbled
C. child
D. None of above
a
81. The attribute works for FrameworkElement and FrameworkContentElement
used for consistency.
A. Class
B. Name
C. Key
D. Value
b
82. All XAML resources should have an attribute in WPF.
A. x:Name
B. x:Class
C. x:Value
D. x:Key
d
83. x:Null specifies null as a value for a property and can be used either for attributes
or property element values.True or False?
A. True
B. False
a
84. provides a value for a property by deferring that value to be a run-
time reference to a resource.
A. StaticResource
B. DynamicResource
C. RelativeSource
D. Binding
b
85. provides a value for a property by substituting the value of an
already defined resource.
A. StaticResource
B. DynamicResource
C. RelativeSource
D. Binding
a
86. provides source information for a Binding that can navigate
several possible relationships in the run-time object tree.
A. StaticResource
B. DynamicResource
C. RelativeSource
D. Binding
c
87. provides a data bound value for a property, using the data context that
applies to the parent object at run time.
A. StaticResource
B. DynamicResource
C. RelativeSource
D. Binding
d
88. What is full form of WPF?
a) Windows Presentation FoundationClass
b) Windows Precomputed FoundationClass
c) Windows Presentation Functions
d) None of These
a
89. What is XAML?
a)Extensible and Markup Language
b)Extensible Application Markup Language
c) Xtra Application Markup Language
d) None of These
b
90. Does that mean WPF has replaced DirectX?
a)Yes
b)No
b
91. Is XAML meant only for WPF ?
a)Yes
b)No
b
92. What is the stand for is XBAP?
A. extensible based application
B. XAML Browser Application
C. XAML Based Application
D. none
b
93. Which of the following have two states of Freezable object?
A. Fix and Unfix
B. Frozen and unfrozen.
C. Static and Dynamic
D. None
b
94. Which layout control would be the best choice for a user interface that requires
evenly spaced controls laid out?
A. Grid
B. Canvas
C. UniformGrid
D. EvenlyGrid
c
95. Events Supported by WPF is are?
A. Direct Event
B. Bubbling Event
C. Tunneling Event
D. All of the above
d
96. WPF transformations can be used for
A. Only rotaion
B. Only scaling
C. Only skewing
D. rotation, scaling, and skewing
d
97. Which object can be used share the variable across pages in WPF?
A. Application
B. Session
C. Cookies
D. Viewstate
a
98. Which of the following is true regarding XAML?
A. Separation of designer code and logic
B. Tools like Expression Blend do not support XAML.
C. XAML is platform independent.
D. All of the above
a
99. How you can set a working mnemonic key for a label?
A. Set the Target property to the target control. Precede the letter for the mnemonic
key with an underscore symbol in the Content property of the Label control.
B. You must place both the Label control and the Target property in the same container.
C. Set the Mnemonic Key property on the Label control.
D. None
a
100. In WPF which language is used to express user interface?
A. XML
B. XAML
C. WSDL
D. C#
b
101. Which of the following methods of the JsonSerialization class can be used to
convert a value of the specied type into a JSON string,encoded as UTF-8 bytes?a.None of
the others
b.SerializeToUtf8Bytes()
c.Serialize8Bytes()
d.SerializeToUTF8()
b
102. Which type of application you should not use ASP.NET Core SignalR to
develop?
A. Notification application: you want to notify 1 client or all connected clients.
This application
some alerts, a reminder, feedback or comments and so on.
B. Chat application: you want to implement a chat application, either it could be one-to
one
C. Gaming application: you want to create a gaming application that requires
frequently push
and so on.
D. Word processing application: you want to create a word processing application
that allow
edit, save and print documents
D
103. Choose the correct statement about Parallel Computing
A. All of the others
B. A problem is broken into discrete parts that can be solved concurrently
C. Each part is further broken down into a series of instructions
D. Instructions from each part execute simultaneously on different processors
A
104. Choose the correct statement about Dependency Injection (DI)
A. The main idea of DI is to reduce the coupling between classes and move the
binding of a
concrete implementation out of the dependent class
B. Inversion of Control (loC) can be done using DI, but very difficult to implement
C. DI explains how to implement functions of the applications into abstract classes
and inter
design pattern
D. None of the others
A
105. U04-Q003 Which of the following is one of the basic procedures to distribute
tasks in systems with multiple processors?
a. Symmetrical multiprocessing (SMP)
b. Asynchronous multiprocessing (AMP)
c. All of the others
d. Synchronous multiprocessing (SNP)
e. None of the others
A
106. Which of the following methods of the WebRequest Class that returns a response
to an In
A. GetResponse()
B. CreatetHttpResponse()
C. CreateResponse()
D. GetHtpResponse()
A
107. Which of the following statements related to the benefits of the Inversion of
Control (loC) is
A. The loC principle helps in designing loosely coupled classes that make them testable,
r extensible
B. Minimizes the amount of code in our application. With IOC containers, we care
about ho
created and how we get references to the ones we need
C. 1OC containers support eager instantiation and lazy loading of senvices but containers
d
support for instantiation of managed objects, cyclical dependencies, life cycles
managemer
D. All of the others
A
108. Choose the correct statement about PresentationFramework.dll assembly in the
WPF Architecture
a. It provides basic types like UIElement and Visual. The UIElement defi nes the
actions and element layout properties and provides
classes to override them if required
b. It provides the basic types to build a WPF application, such as windows,
controls, shapes, media, documents, animation, data
bindings, style, etc
c. None of the others
d. It holds the WPF basic types like DependencyProperty,
DependencyObject, DispatcherObject, and other types
B
109. Which of the following methods of the HttpClient Class can be used to send a
GET request to the specifi ed Uri as an asynchronousoperation?
a. GetDataAsync(String)
b. GetStringAsync(String)
c. None of the others
d. GetAsync(String)
D
110. Choose the incorrect statement about Uniform Resource Identifi er (URI)
a. The Uri class in the System namespace performs just this division, exposing a
property for each element
b. A URI (Uniform Resource Identifi er) is a specially formatted string that describes
a resource on the internet or a LAN, such as a
web page, fi le, or email address
c. URI is a subset of Uniform Resource Location (URL) that describes the network
address or location where the source is available
d. A URI can be broken up into a series of elements—typically, scheme, authority, and
path
C
111. What is Windows Presentation Foundation (WPF)?
a. WPF is a UI framework that creates desktop client applications
b. WPF is a UI framework that creates web applications
c. WPF is a UI framework that creates mobile applications
d. WPF is a UI framework that creates API.
A
112. Choose the correct statement about Windows Presentation Foundation (WPF)
a. The WPF is only supported by the .NET Core
b. The WPF is only supported by the both .NET Framework and .NET Core
c. The WPF supports a broad set of application development features, including
an application model, resources, controls, graphics,
layout, data binding, documents, and security
d. WPF uses the Extensible Markup Language (XML) to provide a declarative model
for application programming
C
113. Which of the following is one of the serialization engines in .NET?
a. XmlSerializer
b. ObjectSerializer
c. StreamSerializer
d. DataSerializer
A
114. Choose the main purpose of the Razor Pages PageModel class.
a. To provide the easy way to reduce the code for the UI components.
b. To provide the easy way to understand the UI components with processing code logic
for the page.
c. To provide clear separation between the UI layer (the .cshtml view file()
and processing logic for the page.
d. To provide clear separation between the UI layer (the .cshtml.cs view file()
and processing logic for the page.
C
115. Which of the following statements related to the Single Responsibility Principle
is True?
a. A class should be inherited from many other classes
b. A class should be implemented from multiple interfaces
c. A class should have only a single responsibility
d. None of the others
C
116. What is the Deserialization process?
a. Deserialization is the reverse process where the binary stream is used to recreate
the actual data in the application
b. Deserialization is the act of taking data from XML or JSON and convert to
bytes stream
c. Deserialization works in reverse, taking a data stream and reconstituting it into in-
memory objects and stored on client-side
d. Deserialization works in reverse, taking a data stream and reconstituting it into an in-
memory object or object graph
D
117. Choose the correct answer with Server-side validation in Razor Pages.
a. if (!ModelState.IsCorrect)
{
return Page();
}
b. if (!ModelState.IsTrue)
{
return Page();
}
c. if (!ModelState().IsValid())
{
return Page();
}
d. if (!ModelState.IsValid)
{
return Page();
}
D
118. Choose the correct anwser for Symmetrical multiprocessing (SMP).
a. None of the others
b. Usually, one processor acts as the main processor. It works as a manager and is
in charge of distributing the tasks to the other
available processors, using diff erent kinds of algorithms for this purpose
c. Any available processor or core can execute tasks. The most used and effi cient one
is n-way symmetrical multiprocessing,
where n is the number of installed processors. With this procedure, each processor can
execute a task isolated from the rest
and also when a particular software is not optimized for multiprocessing systems
d. All of the others
C
119. What is not a role of System.Threading.Tasks Namespace in Parallel
Programming?
a. Provides types that simplify the work of writing concurrent and asynchronous code
b. All of the others
c. None of the others
d. The main types are Task which represents an asynchronous operation that can
be waited on and cancelled, and
Task<TResult>, which is a task that can return a value
e. The TaskFactory class provides static methods for creating and starting tasks, and
the TaskScheduler class provides the default
thread scheduling infrastructure
C
120. Choose the correct answer about ASP.NET SignalR.
a. SignalR also provides a very simple, high-level API for doing server to client RPC
in your ASP.NET application, as well as adding
useful hooks for connection management, for example connect/disconnect events,
grouping connections, authorization.
b. ASP.NET SignalR is a new library for ASP.NET developers that makes it
incredibly simple to add real-time web functionality to
your applications.
c. All of the others.
d. SignalR can be used to add any sort of "real-time" web functionality to your ASP.NET
application.
C
121. What is not property of the System.Threading.Tasks.Task class
a. IsCompleted
b. IsCanceled
c. IsCorrected
d. Status
e. CompletedTask
C
122. Choose the correct statement related to the WebResponse Class
a. The WebResponse class is the abstract base class from which protocol-specifi c
response classes are derived
b. Applications can participate in request and response transactions in a protocol-agnostic
manner using instances of the
WebResponse class
c. All of the others
d. Client applications do not create WebResponse objects directly, they are created
by calling the GetResponse method on a
WebRequest instance
C
123. SignalR provides two models for communicate between clients and severs:
Persistent Connections, Hubs. Choose the correct
information about Persistent Connections.
a. Persistent Connections provide a High-level API for the client and server to call
each other's method. It will be very familiar to
those developers who have worked on remote invocation APIs.
b. Persistent Connections provide direct access to a low-level communication
protocol that signalR provides. Each client
connection to a server is identifi ed by a connectionID.
c. None of the others.
d. If you have multiple types of messages that you want to send between a server and a
client then it is recommended to use
Persistent Connections so you do not need to do your own dispatching.
B
124. Which of the following statements related to the Inversion of Control (IoC)
is True?
a. None of the others
b. All of the others
c. It is used to invert diff erent kinds of controls in object-oriented design to achieve
high coupling
d. It makes the application diffi cult to test and maintain
e. It is a design principle
E
125. Which of the following statements related to the Dependency Inversion Principle
is True?
A. High-level modules should not depend on low-level modules; both should depend on
abstract
Abstractions should not depend on details. Details should depend upon abstractions
B. Low-level modules should depend on high-level modules; both should depend on
abstract
C. High-level modules should depend on low-level modules; both should depend on
abstract
Abstractions should depend on details. Details should not depend upon abstractions
D. All of the others
A
126. Choose the comect statement related to processor configurations and the number
of tasks th
perform in the Hyper-threading (HT) technology
A. A single processor with a single-core chip: One task at a time
B. A single processor with an HT-enabled single-core chip: Four tasks at a time
C. A single processor with an HT-enabled dua-core chip: Eight tasks at atime
D. None of the others
B
127. Which of the following methods of the Background task can be triggered when
the application start?
A. StartAsync(CancellationToken)
B. BeginAsync(CancellationToken)
C. ExecuteAsync(CancellationToken)
D. None of the others
D
128. Which of the following properties of the Task class can be used to get a value that
indicates
has been completed?
A. IsCompleted
B. IsFinished
C. IsTaskDone
D. IisCompletedTask
A
129. Choose the correct information for two common handler methods for Razor Pages
A. OnGet to initialize state needed for the page. OnPost to handle form submissions
B. OnPost to initialize state needed for the page. OnPut to handle form submissions
C. OnGet to initialize state needed for the page. OnPut to handle form submissions.
D. OnGet to get state needed for the page. OnPost to initialize form submissions
A
130. What is the main problem of Mono-Processor Systems?
A. von Neumann's Bottileneck problem
B. Cost problem
C. Heat dissipation problem
D. None of the others
A
131. public class Order{
public int Orderld { get, set, }
public double Total get, set,}
class Program{
static void Main(stringl]
args string order Json= @'T
Orderld.1,iTotal10.5),
Orderld-2Tota 20.5)
var orders JsonSerializer
Deserialize<List<Orderp>(orderJson)
Console. Writel.ine(S"%orders.Count):{orders.Sum(o=>o.Total)))
Console.ReadKey(
Which one of the following is the output of the above code?
A. 2:31
B. 2:10.5
C. 2:20.5
D. 2:30
B
132. Suppose that you create a folder named Products (in Pages folder of ASP NET
Core Web A
add a file named "Index.cshtml' to it, choose the corect route(s).
A. Products" "Products/Index"
B. Products", "Index/Products"
C. "Index/Products", "Products/Index"
D. None of the others
A
133. A Razor PageModel class is an implementation of the page controller pattern.
Choose the cc
about page controller.
A. A page controller is "an object that handles a request for a specific page or action on a
we
B. A page controller is defined as "a controller that handles all requests for a website"
C. A page controller is "an object that handles many requests for a specific action on a
webs
D. A page controller is defined as "a controller that handles all requests of a specific user"
A
134. public class Employeef
public string firstName { get, set,}
[Jsonlgnore]
public string lastName {get, set;}
class Program{
static void Main(string|
args) string empJson = @"
firstNameJohn
lastNameDoe
var emp JsonSerializer. Deserialize<Employee>(empJson);
Console.WriteLine(S"{emp.firstName):{emp.lastName"
Console.ReadKey0):
Which one of the following is the output of the above code?
A. John:
B. John:Doe
C. Doe
D. Compile-time error
A
135. public class Student{
JsonPropertyName("fullName")]
public string firstName ( get set; }
public int age{ get, set
class Program{
static void Main(string] args
Student john new Student { firstName "joh", age=20);
var strJson JsonSerializer.Serialize(john);
Console Writeline(strJson);
Console.ReadKey();
Which one of the following is the output of the above code?
A. (fullName""john", "age":20)
B. {firstName""john","age":20}
C. firstName john
D. rfullName "john
B
136. Choose the correct statement about UIElement in the WPF Types
A. That is a class adds the basic functionlity of layout, input, focus, and events to
Ul eleme
basic foundation of the layout process
B. That is a class extends the functionality provided by the UIElement, and override
the layo
level implementations
C. That is a class is the base class for shape elements like Line, Ellipse, Polygon,
Path, etc
D. None of the others
A
137. Choose the correct statement about WPF Types
A. All of the others
B. DependencyObject provide features like change notification, support data
bindings, atta
C. Visual: The Visual class defines all the properties required for rendering, clipping,
transfc
and hit test
D. DispatcherObject WPF application uses Single-Thread Affinity (STA) model
and therefor
element is owned by a single thread
A
138. Which of the following statements about the benefits of Dependency Injection
(DI) is True?
A. All of the others
B. Extensibility
C. Testability
D. Maintainability
A
139. Which of the following statements related to the Parallel Computing is True?
Statement 1. Parallel computing is the use of multiple processing elements
simultaneously f
problem
Statement 2. In Parallel computing, problems are broken down into instructions and are
solv
as each resource that has been applied to work is working at the same time
A. Statement 1 and 2
B. Statement 1
C. Statement 2
D. None of the others
A
140. public record Order
public int Orderld { get, set; }
public string OrderDatel get; set; }
class Program
static void Main(string] args){
List Orderp orders new List<Order
new Ordert Orderld=1,0rderDate="12/15/20307
var orderJson = JsonSerializer.Serialize(orders);
Console.Writeline(S"{orderJson)");
Console.ReadKey(0:
Which one of the following is the output of the above code?
A. IOrderld":1, OrderDate""12/15/2030')
B. rOrderld:1,'OrderDate""12/15/2030
C. rorderld":1, OrderDate""12/15/2030
D. An exception will be thrown
B
141. Which of the following is one of the Behavioral Design Patterns?
a .Facade
b. Abstract Factory
c. Chain of responsibility
d. Bridge
C
142. Which is a definition of a static method?
a. public static MethodA()
b .public void MethodA()
c. private static MethodA()
d. public static void MethodA()
D
143. Which of the following is one of the Gang of Four (GoF) patterns categories?
a. All of the others
b. Behavioral
c. Creational
d. Structural
A
144. Which of the following keywords meaning access is limited in the same assembly
but not outside the assembly?
a. protected internal
b. public
c .private
d. internal
D
145. Which of the following statements related to Generic Class is True?
a. When creating generic classes, important considerations include: class type
to generalize into type parameters
b. Generic classes encapsulate operations that are not specific to a particular data type
c. None of the others
d. Generic classes are defined using a type parameter in parentheses after the class name
B
146. Choose the correct statement related to Generics in C#.
a. A type parameter is a placeholder for a particular type specified when creating
an instance of the generic type
b. Generic means the general form, not specific. In C#, generic means not specific to
a particular data type
c. Generic can be used with classes, interfaces, fields, methods, properties, and
delegates using the out parameter
d. None of the others
B
147. Which of the following statements related to the Generic Method is True?
a. A method declared with the type parameters for its return type or parameters is called a
generic method
b .Generic methods can only be used to static methods
c .Generic methods can not be defined within non-generic classes
d. None of the others
A
148. For the following statements related to ThreadPool:
Statement 1. The thread pool manages threads efficiently by minimizing the number of
threads that must be created, started, and stopped.
Statement 2. By using the thread pool, we can focus on your business problem rather than
the application's threading infrastructure.
Choose the correct answer :

a. Statement 1 is True and 2 is False


b. Statement 1 is False and 2 is True
c. Statement 1 and 2 are True
d. Statement 1 and 2 are False
C
149. Which of the following keywords is used to override (hidden) an existing method
(must not virtual method) of the base class?
a. new
b. virtual
c. hidden
d. override
A
150. Choose the incorrect statement about the delegate.
a. Delegates are used to invoke methods that have the same signatures
b. Delegates are of reference types
c. A delegate cannot use with event
d. Delegates are type-safe
C
151. Which statement is incorrect about C# language?
a. C# fully supports aspect-oriented programming techniques
b. There is no pointer required in C#
c. C# does support Automatic memory management through the delete keyword
d. C# fully supports interface-based programming techniques
C
152. Choose the correct statement related to Design Patterns is True?
a. A design pattern provides a general reusable solution for the common problems that
occur in software design
b. A design pattern is a description or template for how to implement an algorithm that
can be used in many different applications
c. A design pattern is a finished design that can be transformed directly into code C# or
Java
d. None of the others
A
153. Choose the correct statement related to using collections.
a. Using collections involves a significant performance overhead in the form of access to
elements
b. A primary limitation of collections is the absence of effective type checking
c. The implicit and explicit type casting in the collections help to gain the high
performance
d. None of the others
B
154. To read a line from the command line window (console window), which of the
following statements should be used?
a. System.Console.WriteLine();
b. System.Read.ReadLine();
c. System.Console.ReadLine();
d. System.ReadLine();
C
155. Which of the following statement is one of the core components of the .NET
Framework integral to any application or service development?
a. Microsoft Intermediate Language (MSIL)
b. Custom Assemblies
c. None of the others
d. .NET Framework Class Library (FCL)
D
156. Which of the following statements related to the characteristics of the delegate
type is True?
Statement 1: Invoke to methods that have the same signature.
Statement 2: Can be used as the parameters of any method.
Statement 3: Can be used to invoke methods via synchronous model by BeginInvoke()
method.

a. Statement 1 and 3
b. Statement 1, 2 and 3
c. Statement 1 and 2
d. Statement 2 and 3
C
157. Which of the following is one of the Structural Design Patterns?
a. Singleton
b. Decorator
c. All of the others
d. Abstract Factory
B
158. Which information is correct about the reference types?
a. Allocated on the managed data
b. Allocated on the stack
c. Can be quickly removed from memory once they fall out of the defining scope
d. Allocated on the managed heap
D
159. What are the benefits of the Design Pattern?
a. Design patterns can speed up the development process by providing tested, proven
development paradigms
b. Reusing design patterns helps to prevent subtle issues that can cause major problems
c. All of the others
d. Improves code readability for coders and architects familiar with the patterns
A
160. Which of the following statements related to Static Constructor is True?
a. The Static Constructors can be used to initialize the value for members in the
level object.
b. All of the others
c. The Static Constructor executes after any instance-level constructors
d. The Static Constructor executes exactly one time, regardless of how many objects
of the type are created
D
161. Choose the correct statement related to events in C#.
a. None of the others
b. An event is a user-generated or system-generated action
c. The events allow an object (source of the event) be able to notify other
objects (subscribers) when the event was destroyed
d. An event is a notification sent by an object to signal the occurrence of an
action. Events in .NET follow the singleton design pattern
B
162. Choose the correct statement related to Lambda Expressions
a. All of the others
b. With Lambda expressions we need to specify the type of the value that we input
thus making it more flexible to use
c. Lambda expressions in C# are used like anonymous functions
d. The '-&gt;' is the lambda operator which is used in all lambda expressions
C
163. In Visual Studio, which utility is used to view: namespaces, classes, methods of
the assemblies?
a. Solution Viewer
b. Object Browser
c. Code Browser
d. Class Viewer
B
164. Choose the correct statement related to the Design Pattern?
a. None of the others
b. Design patterns provide specific solutions, documented in a format that
require specifics tied to a particular problem
c. Patterns allow developers to communicate using well-known, well-understood names
for software interactions
d. Increased software development costs, because problems arise, are not known
C
165. The first character of an identifier (variable) can not be:
a. An underscore character
b. A digit
c. An uppercase letter
d. A lowercase letter
B
166. Which of the following is the benefit of Concurrency?
a. Deadlock: It occurs when two processes are blocked and hence neither can proceed
to execute
b. None of the others
c. Starvation: It occurs when a process does not obtain service to progress
d. Running of multiple applications: It enables to run of multiple applications at the same
time
D
167. Which of the following keywords is used to extend or modify the abstract or
virtual implementation of an inherited method, property, or event?
a. abstract
b. sealed
c. override
d. virtual
C
168. Which the following are important pieces of information of a delegate type?
1. The name of the method on which it makes calls
2. The arguments (if any) of this method
3. The return value (if any) of this method

a. 1, 2 and 3
b. 1 and 2
c. 2 and 3
d. 1 and 3
A
169. Which is keyword meaning access is limited to the current assembly or types
derived from the defining class in the current assembly?
a. internal
b. public
c. protected internal
d. private
C
170. Which of the following is one of the Creational Design Patterns?
a. All of the others
b. Singleton
c. Adapter
d. Decorator
B
171. what is the following style tag used for?
<Window x:Class="fe.MainWindow"
Title="MainWindow" Height="200" Width="300">
<Window.Resources>
<Style TargetType="TextBlock">
<Setter Property="Foreground" Value="Green"/>
<Setter Property="FontSize" Value="20"/>
</Style>
</Window.Resources>
<StackPanel Margin="10">
<TextBlock>WPF</TextBlock>
<TextBox>NET</TextBox>
</StackPanel>
</Window>
A. Set foreground is Green and FontSize is 20 for textBlock controls
B. Set foreground is Green and FontSize is 20 for textBock controls
C. Set foreground is Green and FontSize is 20 for controls
D. Set background is Green and FontSize is 20 for controls
A
172. public record Order{
Public int OrderId {get; set}
Public string OrderDate{get; set}
}
Class Program{
Static void Main(string[] args)
{ List<Order> orders = new List<Order>{
New Order{OrderId=1, OrderDate="12/5/2030"};
}
Var orderJson = JsonSerializer.Serilize(order);
Console.WriteLine($"orderJson");
Console.ReadKey();
}
}
Which one of the following is the output of the above code?
A. [{"OrderId":1, "OrderDate":"12/5/2030"}]
B. {"OrderId":1, "OrderDate":"12/5/2030"}
C. ["OrderId":1, "OrderDate":"12/5/2030"]
D. An exception will be thrown
A
173. Which of the following statements related to the Parallel Computing is True?
Statement 1: Parallel computing is the use of multiple processing elements
simultaneously for solving any problem
Statement 2: In Parallel computing problems are broken down into instructions and are
solved concurently as each resource that has been applied to work is working at the
same time
A. Statement 1 and 2
B. Statement 1
C. Statement 2
D. None of the others
B
174. Javascript clients of signalR application call public method on hubs via the invoke
method of the hubConnection. The invoke method accepts the name of the hub method
and any argument defined in the hub method.
Support that you already have define the following code:
Var connection = new signalR.HubConnectionBuilder()
.withUrl("/chatHub")
.create();
Connection.start();
Which of the following codes you can call "invoke" method?
A. Try {
Await connection .invoke("SendMessage", user, message);
}catch(err)
{ Console.error(err);
}
B. Try {
Await connection .invokeuser, message, ("SendMessage");
}catch(err)
{ Console.error(err);
}
C. None of the others.
D. All of the others.
A
175. A hub is a class the server as a high level pipeline that handler client server
communication. Create a SignalR for your application by adding a class name Chathub
that inherits from Microsoft.AspNetCore.SignalR.hub.
A. public class ChatHub: Hub{
Public async task SendMessage(string user, string message)
{ Await Client.AllSendAsync("ReceirveMessage", user,
message);
}
}
B. public class Hub: ChatHub{
Public async task SendMessage(string user, string message)
{ Await Client.AllSendAsync("ReceirveMessage", user,
message);
}
}
C. public class ChatHub: IHubContext{
Public async task SendMessage(string user, string message)
{ Await Client.AllSendAsync("ReceirveMessage", user,
message);
}
}
D. public class ChatHub: IHub{
Public async task SendMessage(string user, string message)
A { Await Client.AllSendAsync("ReceirveMessage", user,
176. class Program {
Static void main (string[] args){
Uri info = new Uri("http://www.domain.com.80/Info?id=123");
Uri page = new Uri(("http://www.domain.com/info/page.html");
Console.WriteLine($"default HTTP port: {page post}");
Console.WriteLine($"IsBaseOf: {info.IsBaseOf(page)");
Console.ReadKey();
}
}
Which one of the following is the output of the above code?
A. Default HTTP port
80 IsBaseOf: True
B. Default HTTP port
80 IsBaseOf: False
C. Compile time error
D. A run time exception will be thrown
B
177. Which of the following statements related to Task Parallel Library (TPL) is true?
A. By using TPL, we can maximine the performance of our code while focusing on the
work that our program is designed to accomplish.
B. The Task Parallel Library (TPL) is a set of public types and APIs in the system
TPL and system.Threading.Task namespaces
C. The purpose of the TPL is to make developer more productive by simplifying the
process of serial computing of applications
D. All of the others.
D
178. Choose the correct statement about UIElement on the WPF types
A. That is a class adds the basic functionality of layout, input, focus and event to
UI element and set the basic foundation of the layout process
B. That is a class extends the functionality provided by the UIElement and override
the layout framework level implementations
C. That is a class is the base class for shape elements like Line, Elipse, Polygon, etc
D. None of the others
A
179. ASP.NET Core SignalR support two protocols for encoding message. Each
protocol has serialization configuration options. Please choose the correct protocols.
A. JSON and MessagePack
B. BSON and MessagePack
C. JSON and BSON
D. JSON and XML
A
180. Which of the following ways can be used to implement Background Task?
A. Inheriting BackgroundService class
B. Implementing Iservice Interface
C. Inheriting background task class
D. Implementing IserviceTask interface
A
181. 23. which if the following is a valid XML Document?
A. <?xml version="1.0" encoding="UTF-8"?>
<Orders>
<Order Id="001">
<Customer>David &amp; Jason</Customer>
<Order>
<Orders>
B. <?xml version="1.0" encoding="UTF-8"?>
<Orders>
<Order Id="001">
<Customer>David & Jason</Customer>
<Order>
<Orders>
C. <?xml version="1.0" encoding="UTF-8">
<Orders>
<Order Id="001">
<Customer>David &amp, Jason</Customer>
<Order>
<orders>
D. <?xml version="1.0" encoding="UTF-8">
<Order>
<Order Id="001">
<Customer>David &amp; Jason</Customer>
<Order>
<Orders>
A
182. The Hub class has a Context property that contains the program with information
about the connection. To get the unique ID connection, assigned by SignalR. Which the
property we can choose in this case?
A. ConnectionId
B. UserIdentifier
C. User
D. GetHttpContext
A
183. Choose the correct statement about WPF
A. The WPF support a broad set of application development feature, including an
application model, resources, controls, graphics, layout, databinding, documents
and security
B. The WPF is only supported by the .Net Core
C. WPF uses the Extensible Markup Language (XML) to provide a declarative model
for application programming
D. All of the others.
A
184. choose the option is not a feature of signalR for ASP .NET CORE?
A. Handles connection management automatically
B. Sends messages to all connected clients sim
C. Do not send messages to specific client or group of client
D. Scales to handle incresing traffic
C
185. Which of the following properties of the WebRequest class can be used to get the
URI of the associated with the request?
A. Request Uri
B. RequestParam
C. RequestURL
D. None of the other
A
186. choose the correct statement about the initiation of parallel computing
A. All of the others
B. The algorithms must be managed in such a way thay they can be handled in a
parallel xxx
C. The algorithms or programs must have have low coupting and high cohesion
D. It addresses such as communication and synchronization between multiple sub
tasks and
D
187. Which of the following statement related to system.window.controls in the wpf
namspace is true?
A. This is the namespace contains all of the expected WPF widgets, including types
to build menu systems, tooltips, and numerous layout managers
B. This is the root namespace of WPF. We will find core class (suchh as Application and
Window) that are required by any WPF desktop project
C. This is the namespace contains types to work with the documentes API, which
allows us to xxx PDF-style functionsality into our WPF applications, via the XML
Paper Specifications (XPS) protocol
D. All of others
A
188. which of the following ways can be used to implement the Dependency Injection
in the .NET application?
A. All of others
B. Constructor Injection
C. Method Injection
D. Property Injection
A
189. Through serialization, developers can pertom which of the following cation?
A. All of others
B. Sending the object to a remote application by using a web service
C. Passing an object through a firewall as a JSON or XML string
D. Passing an object from one domain to anothers
A
190. Which of the following statements related to interface Segregation Principle
is true?
A. Many client specific interface are better than one general purpose interface
B. The applications should be designed using multiple interface to improve their
correctives
C. Applications should designed using multiple abstract classes to easily endend theist
function
D. All of others
A
191. Which of the following is one of the serialization engines in .NET?
A. XmlSerializer
B. ObjectSerializes
C. Stream Serializer
D. DataSerializer
A
192. choose the correct statement related to the solid principles is true?
A. All the others
B. Solid is a popular set of the design principles that are used in object-oriented software
development
C. The SOLID principle were developed by Robert c martin in a 2000...
D. Solid is an acronym that stands for five keys design principle: single
responsibility principle... principle, liskov substitution principle, interface
segregation and dependency...
A
193. Suppose that you create a folder named Products(in pages folder of ASP .Net
Core Web App project) and add a file named "Index.cshtml" to it. Choose the
correct route(s)?
A. "Products", "Products/Index"
B. "Products", "Index/Products"
C. "Index/Products", "Products/Index"
D. None of the others
A
194. Choose the incorrect statement relate to Networking Definitions?
A. IP address (Internet Protocol): unsigned integer help to identity a network...
B. Port: unsigned 4-byte integer helps operating system different... a
network communicating...
2 bit là đáp án đúng
C. IP address includes IPv4 (4 byte) and IPv6(6byte)
D. None of the others
A
195. which of the following methods of the JsonSerialization Class can be used to
connect a value of the specified type into a json string, encoded as utf-8 bytes?
A. SerializeToUtf8Bytes()
B. Serialize8Bytes()
C. SerializeToUTF8 ()
D. None of the others
A
196. choose the correct statement about PresentatonFramework.dll assembly in the
WPF architecture?
A. It provides the basic types to build a WPF app, such as windows, controls,
shapes, media, documents, animation, data bindings, style, etc.
B. It provides basic types like UIElement and Visual. The UIElement defines the
actions and element layout properties and provides classes to override them if required
C. It hold the wpf basic types like DependencyProperty, DependencyObject,
SispatcherObject, and... types
D. None of the others
A
197. which of the the following properties of the WebResponse class can be used to get
a collection of header name value pairs associated with this request?
A. Headers
B. ContentHeaders
C. ResponseHeaders
D. RequestHeaders
A
198. What are the main characteristics of ASP.NET Core?
A. ASP.NET All meta package which improves development speed, and enables you to
reference all Microsoft packages for ASP.NET Core and it will deploy only those that are
being used by your code
B. There is no web.config. We now use an appsettings.json file in combination with
other sources of configuration (command line args, environment variables, etc.)
C. There is no Global.asax - We have Startup.cs which is used to set up Middleware
and services for DI Container
D. All of these
D
199. All XAML resources should have an attribute in WPF.
Select one:
a. x:Name
b. x:Key
c. x:Value
d. x:Class
B

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy