fork(7) download
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5.  
  6. namespace ConsoleApplication1
  7. {
  8. class Program
  9. {
  10. static void Main(string[] args)
  11. {
  12.  
  13. string[] combo = { "Widget 15.50", "Thingy 50.99", "Ratchet25.00", "Clanger115.49", "Fracker75.25" };
  14. string name = Convert.ToChar(combo[].Substring(0, 7));
  15. double price = Convert.ToInt32(combo[].Substring(7, 12));;
  16.  
  17. parse(ref combo, ref name, ref price);
  18.  
  19.  
  20. }
  21.  
  22. static void parse(ref string[] combo, ref string name, ref double price)
  23. {
  24. for (int x = 0; x < combo.Length; x++)
  25. {
  26. Console.Write(name + price + "\n");
  27. }
  28.  
  29.  
  30. }
  31. }
  32. }
  33.  
Compilation error #stdin compilation error #stdout 0s 0KB
stdin
Develop a C# console application that implements three arrays; a string array initialized with exactly the following five data items { "Widget 15.50", "Thingy 50.99", "Ratchet25.00", "Clanger115.49", "Fracker75.25" }, a string array to hold the five part names to be parsed from the previously detailed string array, an array of five double value prices to be parsed from the previously mentioned array. 
Create a void method that will accept as arguments the two arrays of strings and the array of doubles when called from Main.  In the method you will access the five members of the first string array mentioned above and you will parse out the name portion of each string element (first 7 bytes), assigning the string value to the corresponding element in the array of names.  In the method you will also parse out the numeric portion of each string and assign it to the corresponding element of the price array.  The parsing should be done using the string method SubString.
In Main, after calling the parsing method you will display the elements of both the array of names and the array of prices side-by-side (do not display the array from which you parsed the data items). 
The output should look something like this:
Widget $15.50
Thingy $50.99
Ratchet $25.00
Clanger $115.49
Fracker $75.25
Press any key to continue . . .
compilation info
prog.cs(14,47): error CS1525: Unexpected symbol `['
prog.cs(15,49): error CS1525: Unexpected symbol `['
Compilation failed: 2 error(s), 0 warnings
stdout
Standard output is empty