using System.Collections.Generic;
public string Comp_Name, Comp_Flam, Comp_Tox, Comp_Cor;
public Components(string comp_name, string comp_flam, string comp_tox, string comp_cor, int comp_perc)
public override string ToString()
return "Component Name: " + this.Comp_Name + ", Flammability " + this.Comp_Flam;
public static void Main()
int Numb_Rows, Com_Percent;
int Counter_1, Counter_2;
string Search_Comp, User_Choice_1;
string Stream_Name, Array_Name;
bool Flag_1,Flag_2,Was_Found_1;
string[,] Comp = new string[3,4]{{"CH4","1","4","0"},
List<Components> Stream_1 = new List<Components>();
Console.WriteLine("1 - Search for a component");
Console.WriteLine("2 - Exit");
User_Choice_1 = Console.ReadLine();
if (User_Choice_1 == "1")
Console.WriteLine("Enter the component you want to search for:");
Search_Comp = Console.ReadLine();
Numb_Rows = Comp.GetLength(0);
if (Search_Comp == Comp[Counter_1,0])
Console.WriteLine("It was Found!");
Console.Write("What is the percentage value:?");
Com_Percent = Convert.ToInt32(Console.ReadLine());
Stream_1.Add(new Components(Comp[Counter_1,0], Comp[Counter_1,1], Comp[Counter_1,2], Comp[Counter_1,3], Com_Percent));
} while (Flag_1 == true && Counter_1 < Numb_Rows);
if (Was_Found_1 == false)
Console.WriteLine("Component was not found...");
foreach (var c in Stream_1)