using System;
using System.Collections.Generic;

using System.Text;

namespace Project1
{

   public class Homework
    {
        public static void Main(string [] args)
        {
            Dad d = new Dad();
            d.LitCig();
            Helper h = new Helper();
           
        }
    }

  public  class Dad
    {


        void WithDrawMoney()
        {
            Console.WriteLine("Father: Money Withdrawn");

        }

        internal void Mercedes()
        {
            Console.WriteLine("Father: drive a Mercedes");
        }
        internal void ToShower()
        {
            Console.WriteLine("Father: To Shower");
        }
        protected void TakingDog2Vaccine()
        {
            Console.WriteLine("Dog vaccinated");
        }
        public void LitCig()
        {
            Console.WriteLine("Cig lit");
        }
    }
  public  class Helper
    {
        internal void Mercedes()
        {
            Console.WriteLine("Helper: drive a Mercedes");
        }

        internal void ToShower()
        {
            Console.WriteLine("helper: To Shower");
        }
        public void LitCig()
        {
            Console.WriteLine("Cig lit");
        }
    }
}
using System;
using System.Collections.Generic;

using System.Text;

namespace ConsoleApplication1
{
   public class HomeWorkProtectedInternal
    {
        public static void Main(String[] args)
        {
            Son s = new Son();

            s.LitCig();

            
        }



    }
   public  class Son 
    {
        public void LitCig()
        {
            Console.WriteLine("Cig lit");
        }
    }
}

i have 2 of those classes , i try to import one class into another by going to the option in the toolbar "build" and then "build solution.

then when i come to add a reference in teh other project. i cant find a dll file..
i looked in the project folder of C visual basics 2008 , but no luck... i see only an execution file.. .exe
why is that?

When you created the project did you set it to "Class Library"? That's why you get an exe. You can tell from your code that you have both of them as "Console Application".

Open the project that you want to be a class library (DLL) and go to Project-><Project name> Properties. In the Application tab you should see a 'Output type', change that to class library.

sorry, could you explain to me what class library means?

and what i class applications.

my teacher tends to skip those things

it still won work. i did what you told me i transfered the father/helper class project to library class and then build it.

can i add it to the son class project by reference?

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.