I am pretty new to this. Basically, I created a c# class library with a subclass that has a method that needs to be called in the main app (WPF) - When trying to call method from said subclass, I get the error code
CS7036 There is no argument given that corresponds to the required formal parameter 'identifiant' of 'Personnels.CreerListePersonnel(string, string, string, string, string)
...and can't seem to figure out why.
Here is my subclass :
public class Personnels { //Liste qui sera reponsable de gérer le personnel List<Personnel> personnels = new List<Personnel>(); public void CreerListePersonnel(string identifiant, string prenom, string nom, string nomUtilisateur, string motPasse) { personnels.Add(new Personnel(identifiant, prenom, nom, nomUtilisateur, motPasse)); } } Here is where I am calling it in my main app:
public partial class frmLoggin : Window { Personnels personnels = new Personnels(); bool ouverture = false; public frmLoggin() { InitializeComponent(); try { personnels.CreerListePersonnel(); ouverture = true; txtUtilisateur.Focus(); } catch (Exception ex) { MessageBox.Show(ex.Message + Environment.NewLine + "L'application prendra fin.", "Attention", MessageBoxButton.OK, MessageBoxImage.Information); Application.Current.Shutdown(); } } .....
Again, I am new to this and I'm not sure if I am doing things properly :(
Thanks in advance !