exam questions

Exam 70-483 All Questions

View all questions & answers for the 70-483 exam

Exam 70-483 topic 2 question 142 discussion

Actual exam question from Microsoft's 70-483
Question #: 142
Topic #: 2
[All 70-483 Questions]

You have the following line of code.

You need to create an object named obj that has a type of type1.
Which line of code should you use?

A.

B.

C.

D.

Show Suggested Answer Hide Answer
Suggested Answer: B

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
Mitsoshima
Highly Voted 5 years, 11 months ago
Correct anser is: D CreateInstance() returns an object and it can't be A, because A creates an object of type string.
upvoted 30 times
xman
5 years, 3 months ago
Agree D https://docs.microsoft.com/en-us/dotnet/api/system.activator.createinstance?view=netframework-4.8
upvoted 4 times
...
...
IF_Elias
Highly Voted 5 years, 9 months ago
The answer is: object obj = Activator.CreateInstance(type1); Tested.
upvoted 10 times
...
Sujay
Most Recent 5 years, 1 month ago
Correct answer is D . As "D" word goes down. don't be confused
upvoted 1 times
...
sscooter1010
5 years, 4 months ago
The image is confusing. The letters are below the answers, not above. This is probably the reason for the confusion between C and D
upvoted 4 times
...
founderDev
5 years, 4 months ago
correct answer is Activator.CreateInstance(type1);
upvoted 1 times
founderDev
5 years, 4 months ago
Object obj = Activator.CreateInstance(type1);
upvoted 4 times
...
...
osaki
5 years, 5 months ago
last one is correct
upvoted 3 times
...
user123
5 years, 8 months ago
Its is C, also tested object obj = Activator.CreateInstance(type1);
upvoted 1 times
pgarq19
5 years, 4 months ago
This code is for the option D. Which one should be correct.
upvoted 3 times
...
...
supersunny
5 years, 10 months ago
C is the answer.
upvoted 1 times
...
Bio
5 years, 11 months ago
It is C! using System; public class Program { public static void Main() { Type type1 = typeof(aaa); Object obj = Activator.CreateInstance(type1); Console.WriteLine(obj.GetType().ToString()); } public class aaa { } }
upvoted 1 times
Asa
5 years, 11 months ago
you said C, but your codes is D.
upvoted 11 times
favori3
4 years, 9 months ago
he/she mean for D location of chooses make confusion
upvoted 2 times
...
...
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...