Bienvenido al test sobre C# Para comenzar pulsa sobre el botón de Iniciar.Dispones de 15 minutos para responder el mayor número posible de respuestas correctas.Las preguntas tendrán una única respuesta correcta.Si has terminado el test antes del tiempo establecido, pulsa el botón Finalizar para enviarlo. Para comenzar el test, completa tus datos y pulsa el botón "Siguiente" Nombre completo Email 1 var typeof(MyPresentationModel).Should().BeDecoratedWith(); Attribute.GetCustomAttribute, typeof(SubControllerActionToViewDataAttribute) Attribute.GetCustomAttribute(typeof(ExampleController), typeof(SubControllerActionToViewDataAttribute)) var type = typeof(SomeType); var attribute = type.GetCustomAttribute(); 2 single inheritance type safety dependency injection multiple inheritance 3 Login successful... Login successful... Valid user! an error, because the method signature of Login doesn't match the delegate Valid user! 4 when simultaneous instructions are waiting on each other to finish before executing when you are trying to execute an action after a user event is registered when you try to instantiate two objects at the same time in the same class or struct when you try to execute a series of events simultaneously on multiple threads 5 Variables passed to ref can be passed to a function without being initialized, while out specifies that the value is a reference value that can be changed inside the calling method. Variables passed to out can be passed to a function without being initialized, while ref specifies that the value is a reference value that can be changed inside the calling method. Variables passed to out specify that the parameter is an output parameter, while ref specifies that a variable may be passed to a function without being initialized. Variables passed to ref specify that the parameter is an output parameter, while out specifies that a variable may be passed to a function without being initialized 6 first in, first out ascending descending unordered 7 XML byte stream value stream JSON 8 a private class that uses multithreading a potential deadlock multithread coding thread mismanagement 9 a collection of synchronous methods created during initialization that cannot be reused a collection of threads created during initialization that can be reused a collection of threads only recognized at compile time that can be reused a collection of asynchronous methods created at compile time that cannot be reused 10 Mark the User class with the DeserializableAttribute. Declare the class as public serializable class User {}. Mark the User class with the SerializableAttribute attribute. Declare the class as private serializable class User {}. 11 The break keyword literally breaks out of the current control flow code and stops it dead, while continue keeps executing the code after an exception is thrown. The break keyword jumps out of an iteration and then proceeds with the rest of the control flow code, while continue stops the executing code dead. The break keyword is used to break out of multiple iteration statements, while continue can only break out of code blocks that have single iterations. The break keyword literally breaks out of a control flow statement, while continue ignores the rest of the control statement or iteration and starts the next one. 12 The finally block is called after the execution of a try and catch block, while the finalize method is called just before garbage collection. The finally block is called during the execution of a try and catch block, while the finalize method is called after garbage collection. The finalize block is called during the execution of a try and catch block, while the finally method is called after garbage collection. The finalize block is called before the execution of a try and catch block, while the finally method is called just before garbage collection. 13 Only the LastName property needs to be implemented. Only the FirstName property needs to be implemented. Neither, they are both optional. Both the FirstName and LastName properties need to be implemented. 14 something denoted by the abstract keyword and used system wide; if you want any program to create an object of a class you use the abstract class a class that can be used only as base class a class that is denoted by the class keyword (can be seen and used by any other class in the system--thus it is by default public) a class that is denoted by the virtual keyword 15 var contacts = new List(string); public List(string names) contacts = new List(string names); var contacts = new List(); public List contacts = new List(); 16 AType userData = new AType { name = "John", age = 32 }; Anonymous userData = new Anonymous { name = "John", age = 32 }; var userData = new { name = "John", age = 32 }; varT> userData = new T> { name = "John", age = 32 }; 17 public int userID ; public int userID = { public get, private set}; public int userID { get; private set; } public int userID [get, private set]; 18 The wait keyword is missing from the end of the method. The yield keyword is missing from the method. The method is missing an await keyword in its body. The return yield statement is missing at the end of the method. 19 public static void IsvalidName(this string i, string value) {} public string IsvalidName(this string i, string value) {} public void IsvalidName(this string i, string value) {} public static string IsvalidName(this string i, string value) {} 20 int currentState = AppState.Loading.rawValue; string currentState = AppState.Loading.integralVal; string currentState = (string)AppState.Loading; int currentState = (int)AppState.Loading; 3 out of 2