Microsoft 70-483 Programming in C# Online Training
Microsoft 70-483 Online Training
The questions for 70-483 were last updated at Nov 26,2024.
- Exam Code: 70-483
- Exam Name: Programming in C#
- Certification Provider: Microsoft
- Latest update: Nov 26,2024
You are creating an application that manages information about your company’s products. The application includes a class named Product and a method named Save.
The Save() method must be strongly typed. It must allow only types inherited from the Product class that use a constructor that accepts no parameters.
You need to implement the Save() method.
Which code segment should you use?
- A . Option A
- B . Option B
- C . Option C
- D . Option D
DRAG DROP
You are developing an application by using C#. The application will output the text string "First Line" followed by the text string "Second Line".
You need to ensure that an empty line separates the text strings.
Which four code segments should you use in sequence? (To answer, move the appropriate code segments to the answer area and arrange them in the correct order.)
You are developing an application. The application includes classes named Mammal and Animal and an interface named IAnimal.
The Mammal class must meet the following requirements:
• It must either inherit from the Animal class or implement the IAnimal interface.
• It must be inheritable by other classes in the application.
You need to ensure that the Mammal class meets the requirements.
Which two code segments can you use to achieve this goal? (Each correct answer presents a complete solution. Choose two.)
- A . Option A
- B . Option B
- C . Option C
- D . Option D
DRAG DROP
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.)
You are developing an application by using C#.
The application includes the following code segment. (Line numbers are included for reference only.)
The DoWork() method must throw an InvalidCastException exception if the obj object is not of type IDataContainer when accessing the Data property.
You need to meet the requirements.
Which code segment should you insert at line 07?
- A . var dataContainer = (IDataContainer) obj;
- B . var dataContainer = obj as IDataContainer;
- C . var dataContainer = obj is IDataContainer;
- D . dynamic dataContainer = obj;
An application receives JSON data in the following format:
The application includes the following code segment. (Line numbers are included for reference only.)
You need to ensure that the ConvertToName() method returns the JSON input string as a Name object.
Which code segment should you insert at line 10?
- A . Return ser.Desenalize (json, typeof(Name));
- B . Return ser.ConvertToType<Name>(json);
- C . Return ser.Deserialize<Name>(json);
- D . Return ser.ConvertToType (json, typeof (Name));
You are developing an application that includes the following code segment. (Line numbers are included for reference only.)
The GetCustomers() method must meet the following requirements:
• Connect to a Microsoft SQL Server database.
• Populate Customer objects with data from the database.
• Return an IEnumerable<Customer> collection that contains the populated Customer objects.
You need to meet the requirements.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
- A . Insert the following code segment at line 17: while (sqlDataReader.GetValues())
- B . Insert the following code segment at line 14: sqlConnection.Open();
- C . Insert the following code segment at line 14: sqlConnection.BeginTransaction();
- D . Insert the following code segment at line 17: while (sqlDataReader.Read())
- E . Insert the following code segment at line 17: while (sqlDataReader.NextResult())
DRAG DROP
You are developing an application that includes a class named Customer.
The application will output the Customer class as a structured XML document by using the following code segment:
You need to ensure that the Customer class will serialize to XML.
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.)
An application will upload data by using HTML form-based encoding. The application uses a method named SendMessage.
The SendMessage() method includes the following code. (Line numbers are included for reference only.)
The receiving URL accepts parameters as form-encoded values.
You need to send the values intA and intB as form-encoded values named a and b, respectively.
Which code segment should you insert at line 04?
- A . Option A
- B . Option B
- C . Option C
- D . Option D
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?
- A . new XmlSerializer(typeof(Location))
- B . new NetDataContractSerializer()
- C . new DataContractJsonSerializer(typeof (Location))
- D . new DataContractSerializer(typeof(Location))