Hi,
I'm trying to translate a class to c# from vb6 (see C# code below). It fails to Build in Visual Studio, giving me "class used as type" error to relation to m_Dept. This assignment worked in VB6 and in VB.net but I want to rewrite the class in C#. How can I assigned another class object as property of class Employee?
(Class Department is included as a file in the same VS Solution as class Employee. It compiles without issues)

Thanks for Answers!

namespace Employee   
{

    public class Employee

    {
///-- CLASS LOCAL VARIABLES DECLARATION
///Option Explicit On - not used in C#

private string n_FirstName;
private string n_LastName;
private string n_FullName;

private clsDepartment d_Dept;


        private Employee(){
            this.m_Dept = new clsDept();
            this.m_ctDept = new clsDept();
        }

         ~Employee(){
        this.m_dept = null;
        this.m_ctDept = null;

        }

I don't see where m_Dept ior m_dept s defined.
...remember, C# is case-sensitive.

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.