Error 1 The best overloaded method match for 'Practice_Csharp_2.Program.Mark_info(string[], string[], string[])' has some invalid arguments
Error 2 Argument 1: cannot convert from 'int[]' to 'string[]'
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace Practice_Csharp_2 { enum constant { subject = 6, name = 3, } class Program { static void Main(string[] args) { string[] student = new string[(int)constant.name]; string[] course = new string[(int)constant.subject]; int[] Marks = new int[18]; int x, y; Console.ForegroundColor = ConsoleColor.DarkGreen; Console.WriteLine("\t\t\t-------------------------"); Console.WriteLine("\t\t\tStudent Managment System."); Console.WriteLine("\t\t\t-------------------------"); Console.ResetColor(); Console.ForegroundColor = ConsoleColor.Magenta; Console.Write("\n\t\t\tEnter Name Of Student."); Console.ResetColor(); Console.Write("\n"); for (x = 0; x < (int)constant.name; x++) { Console.Write("\nEnter Student {0} Name:", x + 1); student[x] =Convert.ToString(Console.ReadLine()); } //Calling Function For Taking Student Course cou(course); Console.Write("\nEnter Marks Of Student Subject -Wise.\n"); //Loop Show Name And Take Their Marks Of Subject. for (x = 0; x < (int)constant.name; x++) { Console.Clear(); Console.Write("\n\t\t\tEnter {0} Marks.", student[x]); for (y = 0; y < (int)constant.subject; y++) { Console.WriteLine("\n\n{0} Marks:", course[y]); Marks[y] = Convert.ToInt32(Console.ReadLine()); } } //Pass Marks And Student Name Through Function.<\b> //1:I Got One Error On Function Of Array Passing Mark_info( Marks, student, course); Console.ReadLine(); } //Making New Function For Getting Course Name. static string[] cou(string[] course) { int x; Console.ForegroundColor = ConsoleColor.Magenta; Console.Write("\n\t\t\tEnter Subject Name."); Console.ResetColor(); for (x = 0; x < (int)constant.subject; x++) { Console.Write("\nEnter Subject {0} Name.",x+1); course[x] = Convert.ToString(Console.ReadLine()); } Console.Clear(); return course; } //2nd Functin Which Show Enter DATA (Student Name& Marks). static void Mark_info(string[] Marks, string[] student, string[] course) { int x, y; Console.Write("Student Detail."); for (x = 0; x < (int)constant.name; x++) { Console.Write("\t\t\tStudent {0} Detail.", student[x]); Console.Clear(); for (y = 0; y < (int)constant.subject; y++) { Console.Write("{0} Marks:{1}", course[y], Marks[y]); } } } } }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)