Question
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
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started