1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Refrence adding problem

Discussion in 'C#' started by Carlos, Sep 17, 2009.

  1. Carlos

    Carlos New Member

    Joined:
    Dec 5, 2008
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    none
    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);}        
    
     
  2. Carlos

    Carlos New Member

    Joined:
    Dec 5, 2008
    Messages:
    57
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    none
    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???
     
  3. sameer_havakajoka

    sameer_havakajoka New Member

    Joined:
    Sep 14, 2009
    Messages:
    271
    Likes Received:
    2
    Trophy Points:
    0
    Occupation:
    Sleeping
    Location:
    Hava Ke Paro Me
    Mridula might be able to help, I have seen so many article of her in c/c++
     
  4. SaswatPadhi

    SaswatPadhi ~ Б0ЯИ Τ0 С0δЭ ~

    Joined:
    May 5, 2009
    Messages:
    1,343
    Likes Received:
    55
    Trophy Points:
    0
    Occupation:
    STUDENT !
    Location:
    Orissa, INDIA
    Home Page:
    Dude, C/C++ and C#(.NET) are different :)
     

Share This Page