//========================================================== public void GetBalances(Bittrex B) { BittrexResult <List <BittrexBalance> > Balances = B.GetBalances(); if (GetIsResultValid(Balances)) { foreach (BittrexBalance BB in Balances.Result) { Console.WriteLine(BB.ToString()); } } }
private static void writeOutputTxt(string[,] student, double[] studentAvg, string[] studentLetterGrade) { string path = @"output.txt"; // We specify the path of the file that we will read. FileStream fs = new FileStream(path, FileMode.OpenOrCreate, FileAccess.Write); // Created a file stream object. StreamWriter sw = new StreamWriter(fs); // Created a StreamWriter object for reading. // Results will be printed to file and console. for (int i = 0; i < numberOfStudents; i++) // Will return as many as the number of students { sw.WriteLine(student[i, 0] + " " + student[i, 1] + " " + student[i, 2] + " - Student Average: " + studentAvg[i] + " - Letter Grade: " + studentLetterGrade[i]); Console.WriteLine(student[i, 0] + " " + student[i, 1] + " " + student[i, 2] + " - Student Average: " + studentAvg[i] + " - Letter Grade: " + studentLetterGrade[i]); } sw.WriteLine("\n- LETTER GRADE STATUS OF THE CLASS -"); sw.WriteLine("AA: " + AA.ToString() + " Person - " + Convert.ToInt32((AA * 100) / numberOfStudents) + "% OF THE CLASS"); sw.WriteLine("BA: " + BA.ToString() + " Person - " + Convert.ToInt32((BA * 100) / numberOfStudents) + "% OF THE CLASS"); sw.WriteLine("BB: " + BB.ToString() + " Person - " + Convert.ToInt32((BB * 100) / numberOfStudents) + "% OF THE CLASS"); sw.WriteLine("CB: " + CB.ToString() + " Person - " + Convert.ToInt32((CB * 100) / numberOfStudents) + "% OF THE CLASS"); sw.WriteLine("CC: " + CC.ToString() + " Person - " + Convert.ToInt32((CC * 100) / numberOfStudents) + "% OF THE CLASS"); sw.WriteLine("DC: " + DC.ToString() + " Person - " + Convert.ToInt32((DC * 100) / numberOfStudents) + "% OF THE CLASS"); sw.WriteLine("DD: " + DD.ToString() + " Person - " + Convert.ToInt32((DD * 100) / numberOfStudents) + "% OF THE CLASS"); sw.WriteLine("FD: " + FD.ToString() + " Person - " + Convert.ToInt32((FD * 100) / numberOfStudents) + "% OF THE CLASS"); sw.WriteLine("FF: " + FF.ToString() + " Person - " + Convert.ToInt32((FF * 100) / numberOfStudents) + "% OF THE CLASS"); Console.WriteLine("\n- LETTER GRADE STATUS OF THE CLASS -"); Console.WriteLine("AA: " + AA.ToString() + " Person - " + Convert.ToInt32((AA * 100) / numberOfStudents) + "% OF THE CLASS"); Console.WriteLine("BA: " + BA.ToString() + " Person - " + Convert.ToInt32((BA * 100) / numberOfStudents) + "% OF THE CLASS"); Console.WriteLine("BB: " + BB.ToString() + " Person - " + Convert.ToInt32((BB * 100) / numberOfStudents) + "% OF THE CLASS"); Console.WriteLine("CB: " + CB.ToString() + " Person - " + Convert.ToInt32((CB * 100) / numberOfStudents) + "% OF THE CLASS"); Console.WriteLine("CC: " + CC.ToString() + " Person - " + Convert.ToInt32((CC * 100) / numberOfStudents) + "% OF THE CLASS"); Console.WriteLine("DC: " + DC.ToString() + " Person - " + Convert.ToInt32((DC * 100) / numberOfStudents) + "% OF THE CLASS"); Console.WriteLine("DD: " + DD.ToString() + " Person - " + Convert.ToInt32((DD * 100) / numberOfStudents) + "% OF THE CLASS"); Console.WriteLine("FD: " + FD.ToString() + " Person - " + Convert.ToInt32((FD * 100) / numberOfStudents) + "% OF THE CLASS"); Console.WriteLine("FF: " + FF.ToString() + " Person - " + Convert.ToInt32((FF * 100) / numberOfStudents) + "% OF THE CLASS"); sw.Flush(); // txt created sw.Close(); // Close file fs.Close(); }