Go4Expert

Go4Expert (http://www.go4expert.com/)
-   C# (http://www.go4expert.com/forums/c-sharp/)
-   -   Refrence adding problem (http://www.go4expert.com/forums/refrence-adding-problem-t19467/)

Carlos 17Sep2009 20:09

Refrence adding problem
 
Hi! i have created a class library project, and try to use it in my new C# proj through a refrence dll file, but it generate an error that "constructor Employee not defined" can anyone help ????
Class Library Code
Code:

public class Employee
    {
        public int ID; public string name;public string fname;

        Employee()
        {
            ID = 0;name = "; fname = "";
        }

        Employee(int _id, string _name, string _fname)
        {
            ID = _id;name = _name;fname = _fname;
        }
    }
    public class Employeelist
    {
        List<Employee> emplist = new List<Employee>();
        void EmployeeADD(Employee e)
          { emplist.Add(e);}


Carlos 19Sep2009 20:44

Re: Refrence adding problem
 
In my new App, where i have added the reference of the Class library, the EmployeeList instance can be created but when create an instance of Employee class it produce error:
constructor Employee not defined

Can anyone help me???

sameer_havakajoka 19Sep2009 21:15

Re: Refrence adding problem
 
Mridula might be able to help, I have seen so many article of her in c/c++

SaswatPadhi 20Sep2009 01:31

Re: Refrence adding problem
 
Quote:

Originally Posted by sameer_havakajoka (Post 57647)
Mridula might be able to help, I have seen so many article of her in c/c++

Dude, C/C++ and C#(.NET) are different :)


All times are GMT +5.5. The time now is 21:10.