Dumps4cert.com : Latest Dumps with PDF and VCE Files
2018 Apr Microsoft Official New Released 70-494
100% Free Download! 100% Pass Guaranteed!
http://www.Dumps4cert.com/70-494.html
Programming in C#
Question No: 1 – (Topic 1)
You are creating a class named Game.
The Game class must meet the following requirements:
-> Include a member that represents the score for a Game instance.
-> Allow external code to assign a value to the score member.
-> Restrict the range of values that can be assigned to the score member.
You need to implement the score member to meet the requirements. In which form should you implement the score member?
-
protected field
-
public static field
-
public static property
-
public property
Answer: D
Question No: 2 – (Topic 1)
An application includes a class named Person. The Person class includes a method named GetData.
You need to ensure that the GetData() from the Person class. Which access modifier should you use for the GetData() method?
-
Internal
-
Protected
-
Private
-
Protected internal
-
Public
Answer: B
Explanation:
Protected – The type or member can be accessed only by code in the same class or structure, or in a class that is derived from that class.
http://msdn.microsoft.com/en-us/library/ms173121.aspx
The protected keyword is a member access modifier. A protected member is accessible within its class and by derived class instances.
Question No: 3 – (Topic 1)
You are developing a C# application that has a requirement to validate some string input data by using the Regex class.
The application includes a method named ContainsHyperlink. The ContainsHyperlink() method will verify the presence of a URI and surrounding markup.
The following code segment defines the ContainsHyperlink() method. (Line numbers are included for reference only.)
The expression patterns used for each validation function are constant.
You need to ensure that the expression syntax is evaluated only once when the Regex object is initially instantiated.
Which code segment should you insert at line 04?
-
Option A
-
Option B
-
Option C
-
Option D
Answer: D Explanation:
RegexOptions.Compiled – Specifies that the regular expression is compiled to an assembly.This yields faster execution but increases startup time.This value should not be assigned to the Options property when calling the CompileToAssembly method. http://msdn.microsoft.com/en-us/library/system.text.regularexpressions.regexoptions.aspx Additional info
http://stackoverflow.com/questions/513412/how-does-regexoptions-compiled-work
Question No: 4 – (Topic 1)
You are developing an application. The application converts a Location object to a string by using a method named WriteObject.
The WriteObject() method accepts two parameters, a Location object and an XmlObjectSerializer object.
The application includes the following code. (Line numbers are included for reference only.)
You need to serialize the Location object as XML. Which code segment should you insert at line 20?
-
new XmlSerializer(typeof(Location))
-
new NetDataContractSerializer()
-
new DataContractJsonSerializer(typeof (Location))
-
new DataContractSerializer(typeof(Location))
Answer: D Explanation:
The code is using [DataContract] attribute here so need to used DataContractSerializer class.
Question No: 5 – (Topic 1)
You are developing an application by using C#.
The application includes an object that performs a long running process.
You need to ensure that the garbage collector does not release the object#39;s resources until the process completes.
Which garbage collector method should you use?
-
WaitForFullGCComplete()
-
WaitForFullGCApproach()
-
KeepAlive()
-
WaitForPendingFinalizers()
Answer: C
Explanation: The GC.KeepAlive method references the specified object, which makes it ineligible for garbage collection from the start of the current routine to the point where this method is called.
The purpose of the KeepAlive method is to ensure the existence of a reference to an object that is at risk of being prematurely reclaimed by the garbage collector.
The KeepAlive method performs no operation and produces no side effects other than
extending the lifetime of the object passed in as a parameter.
Question No: 6 – (Topic 1)
You are developing an application that includes a class named BookTracker for tracking library books. The application includes the following code segment. (Line numbers are included for reference only.)
You need to add a book to the BookTracker instance. What should you do?
-
Option A
-
Option B
-
Option C
-
Option D
Answer: A
Question No: 7 – (Topic 1)
You are developing an application that will transmit large amounts of data between a client computer and a server.
You need to ensure the validity of the data by using a cryptographic hashing algorithm. Which algorithm should you use?
-
HMACSHA256
-
RNGCryptoServiceProvider
-
DES
-
Aes
Answer: A Explanation:
The .NET Framework provides the following classes that implement hashing algorithms:
-> HMACSHA1.
-> MACTripleDES.
-> MD5CryptoServiceProvider.
-> RIPEMD160.
-> SHA1Managed.
-> SHA256Managed.
-> SHA384Managed.
-> SHA512Managed.
HMAC variants of all of the Secure Hash Algorithm (SHA), Message Digest 5 (MD5), and RIPEMD-160 algorithms.
CryptoServiceProvider implementations (managed code wrappers) of all the SHA algorithms.
Cryptography Next Generation (CNG) implementations of all the MD5 and SHA algorithms. http://msdn.microsoft.com/en-us/library/92f9ye3s.aspx#hash_values
Question No: 8 – (Topic 1)
You are developing an application by using C#.
The application includes an object that performs a long running process.
You need to ensure that the garbage collector does not release the object#39;s resources until the process completes.
Which garbage collector method should you use?
-
WaitForFullGCComplete()
-
SuppressFinalize()
-
collect()
-
RemoveMemoryPressure()
Answer: B
Question No: 9 – (Topic 1)
You are modifying an application that processes leases. The following code defines the Lease class. (Line numbers are included for reference only.)
Leases are restricted to a maximum term of 5 years. The application must send a notification message if a lease request exceeds 5 years.
You need to implement the notification mechanism.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
-
Option A
-
Option B
-
Option C
-
Option D
-
Option E
-
Option F
Answer: A,B
Question No: 10 DRAG DROP – (Topic 1)
You are developing a class named ExtensionMethods.
You need to ensure that the ExtensionMethods class implements the IsEmail() extension method on string objects.
How should you complete the relevant code? (To answer, drag the appropriate code segments to the correct locations in the answer area. Each code segment may be used
once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
Answer:
100% Dumps4cert Free Download!
–Download Free Demo:70-494 Demo PDF
100% Dumps4cert Free Guaranteed!
–70-494 Dumps
Dumps4cert | ExamCollection | Testking | |
---|---|---|---|
Lowest Price Guarantee | Yes | No | No |
Up-to-Dated | Yes | No | No |
Real Questions | Yes | No | No |
Explanation | Yes | No | No |
PDF VCE | Yes | No | No |
Free VCE Simulator | Yes | No | No |
Instant Download | Yes | No | No |
100-105 Dumps VCE PDF
200-105 Dumps VCE PDF
300-101 Dumps VCE PDF
300-115 Dumps VCE PDF
300-135 Dumps VCE PDF
300-320 Dumps VCE PDF
400-101 Dumps VCE PDF
640-911 Dumps VCE PDF
640-916 Dumps VCE PDF
70-410 Dumps VCE PDF
70-411 Dumps VCE PDF
70-412 Dumps VCE PDF
70-413 Dumps VCE PDF
70-414 Dumps VCE PDF
70-417 Dumps VCE PDF
70-461 Dumps VCE PDF
70-462 Dumps VCE PDF
70-463 Dumps VCE PDF
70-464 Dumps VCE PDF
70-465 Dumps VCE PDF
70-480 Dumps VCE PDF
70-483 Dumps VCE PDF
70-486 Dumps VCE PDF
70-487 Dumps VCE PDF
220-901 Dumps VCE PDF
220-902 Dumps VCE PDF
N10-006 Dumps VCE PDF
SY0-401 Dumps VCE PDF