Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

c# Create a static method named CreateStringArray() that takes in 3 strings as parameters. The method should make a new string[]. Next the method should

c# Create a static method named CreateStringArray() that takes in 3 strings as parameters. The method should make a new string[]. Next the method should add each string into its own spot in the string[] and finally return the string[].

Create a static method named SumArray() that takes in an int[] as a parameter. The method should add all of the values in the array together and return the sum.

Create a static method named RemoveNum() that takes in two parameters: a List of numbers (int) and a number (int).

Check to see if the List contains the number parameter that was passed into the method. If so, remove that value from the list. (Note: Because youll be modifying the original list passed in, simply return void.)

Create a static method named AddToList() that takes in a string parameter. The method should add the strings grapes, oranges, and the string parameter to a List of strings. Return the updated List of strings. For example, if "cherries" is passed as a parameter, the method will return a list of "grapes", "oranges", "cherries".

Create a static method named TryMe() that takes in two number (int) parameters. The method should divide the first parameter by the second parameter and return 9 if there is an Arithmetic Exception. If there is no error, return the correct result from the operation.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

PC Magazine Guide To Client Server Databases

Authors: Joe Salemi

1st Edition

156276070X, 978-1562760700

More Books

Students also viewed these Databases questions

Question

Question in Chemical Engineering Please give Correct Answer 1 2 2 .

Answered: 1 week ago