i have problem
error 1 'employeedata.employees' not contain constructor takes 6 arguments c:\users\john\documents\visual studio 2012\projects\consoleapplication2\consoleapplication1\employee data.cs 65 26 employeedata
(http://pastebin.com/embed_js.php?i=0fbwpthp)
using system; using system.collections.generic; using system.linq; using system.text; using system.threading.tasks; namespace employeedata { public class employees { private string firstname; private string lastname; private int age; private char gender; private string pi; private string uniemployeenum; employees(){} employees(string firstname, string lastname, int age, char gender, string pi, string uniemployeenum) { this.firstname = firstname; this.lastname = lastname; this.age = age; this.gender = gender; this.pi = pi; this.uniemployeenum = uniemployeenum; } public string firstname() { return firstname; } public string lastname() { return lastname; } public string pii() { return pi; } public string uniemployeenum() { return uniemployeenum; } public int age() { return age; } public char gender() { return gender; } } class employeedata { void emp() { employees man = new employees("john", "johnny", 19, 'm', "68161863181686", "6846684644"); } static void main(string[] args) { // employee man = new employee("john", "johnny", 19, 'm', "68161863181686", "6846684644"); } } }
try adding "public" access modifier constructors.
Comments
Post a Comment