The following two functions have errors. What are they?
static bool Write() { Console.WriteLine("Text output from function."); } static void myFunction(string label, params int[] args, bool showLabel) { if (showLabel) Console.WriteLine(label); foreach (int i in args) Console.WriteLine("{0}", i); }
Write an application that uses two command-line arguments to place values into a string and an integer variable, respectively. Then display these values.
Create a delegate and use it to impersonate the Console.ReadLine() function when asking for user input.
Modify the following struct to include a function that returns the total price of an order:
struct order { public string itemName; public int unitCount; public double unitCost; }
Add another function to the order struct that returns a formatted string as follows, where italic entries enclosed in angle brackets are replaced by appropriate values:
Order Information: <unit count> <item name> items at $<unit cost> each, total cost $<total cost>